{ "name": "Keyboard/Mouse to Actions", "channels": [ { "from": "Keyboard.A", "when": ["Keyboard.RightMouseButton", "!Keyboard.Control"], "to": "Actions.LATERAL_LEFT" }, { "from": "Keyboard.D", "when": ["Keyboard.RightMouseButton", "!Keyboard.Control"], "to": "Actions.LATERAL_RIGHT" }, { "from": "Keyboard.E", "when": "!Keyboard.Control", "to": "Actions.LATERAL_RIGHT" }, { "from": "Keyboard.Q", "when": "!Keyboard.Control", "to": "Actions.LATERAL_LEFT" }, { "comment" : "Mouse turn need to be small continuous increments", "from": { "makeAxis" : [ [ "Keyboard.MouseMoveLeft" ], [ "Keyboard.MouseMoveRight" ] ] }, "when": [ "Application.InHMD", "Application.SnapTurn", "Keyboard.RightMouseButton" ], "to": "Actions.StepYaw", "filters": [ "constrainToInteger", { "type": "pulse", "interval": 0.2 }, { "type": "scale", "scale": 22.5 } ] }, { "comment" : "Touchpad turn need to be small continuous increments, but without the RMB constraint", "from": { "makeAxis" : [ [ "Keyboard.TouchpadLeft" ], [ "Keyboard.TouchpadRight" ] ] }, "when": [ "Application.InHMD", "Application.SnapTurn" ], "to": "Actions.StepYaw", "filters": [ "constrainToInteger", { "type": "pulse", "interval": 0.2 }, { "type": "scale", "scale": 22.5 } ] }, { "from": { "makeAxis" : [ ["Keyboard.Left" ], ["Keyboard.Right"] ] }, "when": ["Application.InHMD", "Application.SnapTurn", "!Keyboard.Shift"], "to": "Actions.StepYaw", "filters": [ { "type": "pulse", "interval": 0.5, "resetOnZero": true }, { "type": "scale", "scale": 22.5 } ] }, { "from": { "makeAxis" : [ ["Keyboard.A"], ["Keyboard.D"] ] }, "when": [ "Application.InHMD", "Application.SnapTurn" ], "to": "Actions.StepYaw", "filters": [ { "type": "pulse", "interval": 0.5, "resetOnZero": true }, { "type": "scale", "scale": 22.5 } ] }, { "from": { "makeAxis" : [ ["Keyboard.Left"], ["Keyboard.Right"] ] }, "when": ["Application.CameraFirstPerson", "!Keyboard.Shift"], "to": "Actions.Yaw" }, { "from": { "makeAxis" : [ ["Keyboard.Left"], ["Keyboard.Right"] ] }, "when": ["Application.CameraThirdPerson", "!Keyboard.Shift"], "to": "Actions.Yaw" }, { "from": { "makeAxis" : [ ["Keyboard.A"], ["Keyboard.D"] ] }, "when": ["Application.CameraFirstPerson", "!Keyboard.Control"], "to": "Actions.Yaw" }, { "from": { "makeAxis" : [ ["Keyboard.A"], ["Keyboard.D"] ] }, "when": ["Application.CameraThirdPerson", "!Keyboard.Control"], "to": "Actions.Yaw" }, { "from": { "makeAxis" : [ ["Keyboard.TouchpadLeft"], ["Keyboard.TouchpadRight"] ] }, "when": "Application.CameraFirstPerson", "to": "Actions.Yaw" }, { "from": { "makeAxis" : [ ["Keyboard.TouchpadLeft"], ["Keyboard.TouchpadRight"] ] }, "when": "Application.CameraThirdPerson", "to": "Actions.Yaw" }, { "from": { "makeAxis" : ["Keyboard.MouseMoveLeft", "Keyboard.MouseMoveRight"] }, "when": "Keyboard.RightMouseButton", "to": "Actions.Yaw", "filters": [ { "type": "scale", "scale": 0.6 } ] }, { "from": "Keyboard.W", "when": "!Keyboard.Control", "to": "Actions.LONGITUDINAL_FORWARD" }, { "from": "Keyboard.S", "when": "!Keyboard.Control", "to": "Actions.LONGITUDINAL_BACKWARD" }, { "from": "Keyboard.Shift", "when": ["!Keyboard.Left", "!Keyboard.Right"], "to": "Actions.SPRINT" }, { "from": "Keyboard.C", "to": "Actions.VERTICAL_DOWN" }, { "from": "Keyboard.Left", "when": "Keyboard.Shift", "to": "Actions.LATERAL_LEFT" }, { "from": "Keyboard.Right", "when": "Keyboard.Shift", "to": "Actions.LATERAL_RIGHT" }, { "from": "Keyboard.Up", "when": "Application.CameraFirstPerson", "to": "Actions.LONGITUDINAL_FORWARD" }, { "from": "Keyboard.Up", "when": "Application.CameraThirdPerson", "to": "Actions.LONGITUDINAL_FORWARD" }, { "from": "Keyboard.Down", "when": "Application.CameraFirstPerson", "to": "Actions.LONGITUDINAL_BACKWARD" }, { "from": "Keyboard.Down", "when": "Application.CameraThirdPerson", "to": "Actions.LONGITUDINAL_BACKWARD" }, { "from": "Keyboard.PgDown", "to": "Actions.VERTICAL_DOWN" }, { "from": "Keyboard.PgUp", "to": "Actions.VERTICAL_UP" }, { "from": "Keyboard.MouseMoveUp", "when": "Keyboard.RightMouseButton", "to": "Actions.PITCH_UP", "filters": [ { "type": "scale", "scale": 0.6 } ] }, { "from": "Keyboard.MouseMoveDown", "when": "Keyboard.RightMouseButton", "to": "Actions.PITCH_DOWN", "filters": [ { "type": "scale", "scale": 0.6 } ] }, { "from": "Keyboard.TouchpadDown", "to": "Actions.PITCH_DOWN" }, { "from": "Keyboard.TouchpadUp", "to": "Actions.PITCH_UP" }, { "from": "Keyboard.MouseWheelUp", "to": "Actions.LATERAL_RIGHT" }, { "from": "Keyboard.MouseWheelDown", "to": "Actions.LATERAL_LEFT" }, { "from": "Keyboard.MouseWheelLeft", "to": "Actions.BOOM_OUT", "filters": [ { "type": "scale", "scale": 0.02 } ]}, { "from": "Keyboard.MouseWheelRight", "to": "Actions.BOOM_IN", "filters": [ { "type": "scale", "scale": 0.02 } ]}, { "from": "Keyboard.Space", "to": "Actions.VERTICAL_UP" }, { "from": "Keyboard.R", "to": "Actions.ACTION1" }, { "from": "Keyboard.T", "to": "Actions.ACTION2" }, { "from": "Keyboard.Tab", "to": "Actions.ContextMenu" } ] }