Added extra needed checks.

This commit is contained in:
armored-dragon 2024-09-04 01:38:52 -05:00
parent a142f7de72
commit 648c3ff9d8
No known key found for this signature in database
GPG key ID: C7207ACC3382AD8B

View file

@ -1,183 +1,185 @@
{ {
"name": "Keyboard/Mouse to Actions", "name": "Keyboard/Mouse to Actions",
"channels": [ "channels": [
{ "from": "Keyboard.A", "when": ["Keyboard.RightMouseButton", "!Keyboard.Control"], "to": "Actions.LATERAL_LEFT" }, { "from": "Keyboard.A", "when": ["Keyboard.RightMouseButton", "Application.CameraSelfie", "!Keyboard.Control"], "to": "Actions.StrafeRight" },
{ "from": "Keyboard.D", "when": ["Keyboard.RightMouseButton", "!Keyboard.Control"], "to": "Actions.LATERAL_RIGHT" }, { "from": "Keyboard.A", "when": ["Keyboard.RightMouseButton","!Application.CameraSelfie", "!Keyboard.Control"], "to": "Actions.StrafeLeft" },
{ "from": "Keyboard.Q", "when": ["!Application.CameraSelfie", "!Keyboard.Control", "!Application.CaptureMouse"], "to": "Actions.LATERAL_LEFT" }, { "from": "Keyboard.D", "when": ["Keyboard.RightMouseButton", "!Application.CameraSelfie", "!Keyboard.Control"], "to": "Actions.StrafeRight" },
{ "from": "Keyboard.Q", "when": ["Application.CameraSelfie", "!Keyboard.Control"], "to": "Actions.LATERAL_RIGHT" }, { "from": "Keyboard.D", "when": ["Keyboard.RightMouseButton", "Application.CameraSelfie", "!Keyboard.Control"], "to": "Actions.StrafeLeft" },
{ "from": "Keyboard.E", "when": ["!Application.CameraSelfie", "!Keyboard.Control", "!Application.CaptureMouse"], "to": "Actions.LATERAL_RIGHT" }, { "from": "Keyboard.Q", "when": ["!Application.CameraSelfie", "!Keyboard.Control", "!Application.CaptureMouse"], "to": "Actions.LATERAL_LEFT" },
{ "from": "Keyboard.E", "when": ["Application.CameraSelfie", "!Keyboard.Control"], "to": "Actions.LATERAL_LEFT" }, { "from": "Keyboard.Q", "when": ["Application.CameraSelfie", "!Keyboard.Control"], "to": "Actions.LATERAL_RIGHT" },
{ "from": "Keyboard.T", "when": "!Keyboard.Control", "to": "Actions.TogglePushToTalk" }, { "from": "Keyboard.E", "when": ["!Application.CameraSelfie", "!Keyboard.Control", "!Application.CaptureMouse"], "to": "Actions.LATERAL_RIGHT" },
{ "from": "Keyboard.E", "when": ["Application.CameraSelfie", "!Keyboard.Control"], "to": "Actions.LATERAL_LEFT" },
{ "from": "Keyboard.T", "when": "!Keyboard.Control", "to": "Actions.TogglePushToTalk" },
{ "comment" : "Mouse turn need to be small continuous increments", { "comment" : "Mouse turn need to be small continuous increments",
"from": { "makeAxis" : [ "from": { "makeAxis" : [
[ "Keyboard.MouseMoveLeft" ], [ "Keyboard.MouseMoveLeft" ],
[ "Keyboard.MouseMoveRight" ] [ "Keyboard.MouseMoveRight" ]
] ]
},
"when": [ "Application.InHMD", "Application.SnapTurn", "Keyboard.RightMouseButton" ],
"to": "Actions.StepYaw",
"filters":
[
"constrainToInteger",
{ "type": "pulse", "interval": 0.2 },
{ "type": "scale", "scale": 22.5 }
]
}, },
"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", { "comment" : "Touchpad turn need to be small continuous increments, but without the RMB constraint",
"from": { "makeAxis" : [ "from": { "makeAxis" : [
[ "Keyboard.TouchpadLeft" ], [ "Keyboard.TouchpadLeft" ],
[ "Keyboard.TouchpadRight" ] [ "Keyboard.TouchpadRight" ]
] ]
},
"when": [ "Application.InHMD", "Application.SnapTurn" ],
"to": "Actions.StepYaw",
"filters":
[
"constrainToInteger",
{ "type": "pulse", "interval": 0.2 },
{ "type": "scale", "scale": 22.5 }
]
}, },
"when": [ "Application.InHMD", "Application.SnapTurn" ],
"to": "Actions.StepYaw",
"filters":
[
"constrainToInteger",
{ "type": "pulse", "interval": 0.2 },
{ "type": "scale", "scale": 22.5 }
]
},
{ "from": { "makeAxis" : [ { "from": { "makeAxis" : [
["Keyboard.Left" ], ["Keyboard.Left" ],
["Keyboard.Right"] ["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 }
]
}, },
"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" : [ { "from": { "makeAxis" : [
["Keyboard.A"], ["Keyboard.A"],
["Keyboard.D"] ["Keyboard.D"]
] ]
},
"when": [ "Application.InHMD", "Application.SnapTurn" ],
"to": "Actions.StepYaw",
"filters":
[
{ "type": "pulse", "interval": 0.5, "resetOnZero": true },
{ "type": "scale", "scale": 22.5 }
]
}, },
"when": [ "Application.InHMD", "Application.SnapTurn" ],
"to": "Actions.StepYaw",
"filters":
[
{ "type": "pulse", "interval": 0.5, "resetOnZero": true },
{ "type": "scale", "scale": 22.5 }
]
},
{ "from": { "makeAxis" : [ { "from": { "makeAxis" : [
["Keyboard.Left"], ["Keyboard.Left"],
["Keyboard.Right"] ["Keyboard.Right"]
] ]
},
"when": ["!Application.CameraFSM", "!Application.CameraIndependent", "!Application.CameraEntity", "!Application.CaptureMouse", "!Keyboard.Shift"],
"to": "Actions.Yaw"
}, },
"when": ["!Application.CameraFSM", "!Application.CameraIndependent", "!Application.CameraEntity", "!Application.CaptureMouse", "!Keyboard.Shift"],
"to": "Actions.Yaw"
},
{ "from": "Keyboard.Left", { "from": "Keyboard.Left",
"when": ["!Application.CameraFSM", "!Application.CameraIndependent", "!Application.CameraEntity", "Application.CaptureMouse", "!Keyboard.Shift"], "when": ["!Application.CameraFSM", "!Application.CameraIndependent", "!Application.CameraEntity", "Application.CaptureMouse", "!Keyboard.Shift"],
"to": "Actions.LATERAL_LEFT" "to": "Actions.LATERAL_LEFT"
}, },
{ "from": "Keyboard.Right", { "from": "Keyboard.Right",
"when": ["!Application.CameraFSM", "!Application.CameraIndependent", "!Application.CameraEntity", "Application.CaptureMouse", "!Keyboard.Shift"], "when": ["!Application.CameraFSM", "!Application.CameraIndependent", "!Application.CameraEntity", "Application.CaptureMouse", "!Keyboard.Shift"],
"to": "Actions.LATERAL_RIGHT" "to": "Actions.LATERAL_RIGHT"
}, },
{ "from": { "makeAxis" : [ { "from": { "makeAxis" : [
["Keyboard.A"], ["Keyboard.A"],
["Keyboard.D"] ["Keyboard.D"]
] ]
},
"when": ["!Application.CameraFSM", "!Application.CameraIndependent", "!Application.CameraEntity", "!Application.CaptureMouse", "!Keyboard.Control"],
"to": "Actions.Yaw"
}, },
"when": ["!Application.CameraFSM", "!Application.CameraIndependent", "!Application.CameraEntity", "!Application.CaptureMouse", "!Keyboard.Control"],
"to": "Actions.Yaw"
},
{ "from": "Keyboard.A", { "from": "Keyboard.A",
"when": ["!Application.CameraFSM", "!Application.CameraIndependent", "!Application.CameraEntity", "Application.CaptureMouse", "!Keyboard.Control"], "when": ["!Application.CameraFSM", "!Application.CameraIndependent", "!Application.CameraEntity", "Application.CaptureMouse", "!Keyboard.Control"],
"to": "Actions.LATERAL_LEFT" "to": "Actions.LATERAL_LEFT"
}, },
{ "from": "Keyboard.D", { "from": "Keyboard.D",
"when": ["!Application.CameraFSM", "!Application.CameraIndependent", "!Application.CameraEntity", "Application.CaptureMouse", "!Keyboard.Control"], "when": ["!Application.CameraFSM", "!Application.CameraIndependent", "!Application.CameraEntity", "Application.CaptureMouse", "!Keyboard.Control"],
"to": "Actions.LATERAL_RIGHT" "to": "Actions.LATERAL_RIGHT"
}, },
{ "from": { "makeAxis" : [ { "from": { "makeAxis" : [
["Keyboard.TouchpadLeft"], ["Keyboard.TouchpadLeft"],
["Keyboard.TouchpadRight"] ["Keyboard.TouchpadRight"]
] ]
},
"when": ["!Application.CameraFSM", "!Application.CameraIndependent", "!Application.CameraEntity"],
"to": "Actions.Yaw"
}, },
"when": ["!Application.CameraFSM", "!Application.CameraIndependent", "!Application.CameraEntity"],
"to": "Actions.Yaw"
},
{ "from": { "makeAxis" : ["Keyboard.MouseMoveLeft", "Keyboard.MouseMoveRight"] }, { "from": { "makeAxis" : ["Keyboard.MouseMoveLeft", "Keyboard.MouseMoveRight"] },
"when": ["Keyboard.RightMouseButton", "!Application.CaptureMouse"], "when": ["Keyboard.RightMouseButton", "!Application.CaptureMouse"],
"to": "Actions.DeltaYaw", "to": "Actions.DeltaYaw",
"filters": "filters":
[ [
{ "type": "scale", "scale": 0.6 } { "type": "scale", "scale": 0.6 }
] ]
}, },
{ "from": { "makeAxis" : ["Keyboard.MouseMoveLeft", "Keyboard.MouseMoveRight"] }, { "from": { "makeAxis" : ["Keyboard.MouseMoveLeft", "Keyboard.MouseMoveRight"] },
"to": "Actions.DeltaYaw", "to": "Actions.DeltaYaw",
"when": "Application.CaptureMouse", "when": "Application.CaptureMouse",
"filters": "filters":
[ [
{ "type": "scale", "scale": 0.2 } { "type": "scale", "scale": 0.2 }
] ]
}, },
{ "from": { "makeAxis" : ["Keyboard.MouseMoveUp", "Keyboard.MouseMoveDown"] }, { "from": { "makeAxis" : ["Keyboard.MouseMoveUp", "Keyboard.MouseMoveDown"] },
"when": ["!Application.CameraSelfie", "!Application.CameraLookAt", "!Application.CaptureMouse", "Keyboard.RightMouseButton"], "when": ["!Application.CameraSelfie", "!Application.CameraLookAt", "!Application.CaptureMouse", "Keyboard.RightMouseButton"],
"to": "Actions.DeltaPitch", "to": "Actions.DeltaPitch",
"filters": "filters":
[ [
{ "type": "scale", "scale": 0.6 } { "type": "scale", "scale": 0.6 }
] ]
}, },
{ "from": { "makeAxis" : ["Keyboard.MouseMoveUp", "Keyboard.MouseMoveDown"] }, { "from": { "makeAxis" : ["Keyboard.MouseMoveUp", "Keyboard.MouseMoveDown"] },
"to": "Actions.DeltaPitch", "to": "Actions.DeltaPitch",
"when": "Application.CaptureMouse", "when": "Application.CaptureMouse",
"filters": "filters":
[ [
{ "type": "scale", "scale": 0.2 } { "type": "scale", "scale": 0.2 }
] ]
}, },
{ "from": { "makeAxis" : ["Keyboard.MouseMoveUp", "Keyboard.MouseMoveDown"] }, { "from": { "makeAxis" : ["Keyboard.MouseMoveUp", "Keyboard.MouseMoveDown"] },
"when": ["Application.CameraLookAt", "Keyboard.RightMouseButton"], "when": ["Application.CameraLookAt", "Keyboard.RightMouseButton"],
"to": "Actions.DeltaPitch", "to": "Actions.DeltaPitch",
"filters": "filters":
[ [
{ "type": "scale", "scale": 0.2 } { "type": "scale", "scale": 0.2 }
] ]
}, },
{ "from": { "makeAxis" : ["Keyboard.MouseMoveDown", "Keyboard.MouseMoveUp"] }, { "from": { "makeAxis" : ["Keyboard.MouseMoveDown", "Keyboard.MouseMoveUp"] },
"when": ["Application.CameraSelfie", "Keyboard.RightMouseButton"], "when": ["Application.CameraSelfie", "Keyboard.RightMouseButton"],
"to": "Actions.DeltaPitch", "to": "Actions.DeltaPitch",
"filters": "filters":
[ [
{ "type": "scale", "scale": 0.2 } { "type": "scale", "scale": 0.2 }
] ]
}, },
{ "from": "Keyboard.W", "when": ["!Application.CameraSelfie", "!Keyboard.Control"], "to": "Actions.LONGITUDINAL_FORWARD" }, { "from": "Keyboard.W", "when": ["!Application.CameraSelfie", "!Keyboard.Control"], "to": "Actions.LONGITUDINAL_FORWARD" },
{ "from": "Keyboard.S", "when": ["!Application.CameraSelfie", "!Keyboard.Control"], "to": "Actions.LONGITUDINAL_BACKWARD" }, { "from": "Keyboard.S", "when": ["!Application.CameraSelfie", "!Keyboard.Control"], "to": "Actions.LONGITUDINAL_BACKWARD" },
{ "from": "Keyboard.S", "when": ["Application.CameraSelfie", "!Keyboard.Control"], "to": "Actions.LONGITUDINAL_FORWARD" }, { "from": "Keyboard.S", "when": ["Application.CameraSelfie", "!Keyboard.Control"], "to": "Actions.LONGITUDINAL_FORWARD" },
{ "from": "Keyboard.W", "when": ["Application.CameraSelfie", "!Keyboard.Control"], "to": "Actions.LONGITUDINAL_BACKWARD" }, { "from": "Keyboard.W", "when": ["Application.CameraSelfie", "!Keyboard.Control"], "to": "Actions.LONGITUDINAL_BACKWARD" },
{ "from": "Keyboard.Shift", "when": ["!Keyboard.Left", "!Keyboard.Right"], "to": "Actions.SPRINT" }, { "from": "Keyboard.Shift", "when": ["!Keyboard.Left", "!Keyboard.Right"], "to": "Actions.SPRINT" },
{ "from": "Keyboard.C", "when": "!Keyboard.Control", "to": "Actions.VERTICAL_DOWN" }, { "from": "Keyboard.C", "when": "!Keyboard.Control", "to": "Actions.VERTICAL_DOWN" },
{ "from": "Keyboard.Left", "when": "Keyboard.Shift", "to": "Actions.LATERAL_LEFT" }, { "from": "Keyboard.Left", "when": "Keyboard.Shift", "to": "Actions.LATERAL_LEFT" },
{ "from": "Keyboard.Right", "when": "Keyboard.Shift", "to": "Actions.LATERAL_RIGHT" }, { "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.CameraFirstPerson", "to": "Actions.LONGITUDINAL_FORWARD" },
{ "from": "Keyboard.Up", "when": "Application.CameraFirstPersonLookat", "to": "Actions.LONGITUDINAL_FORWARD" }, { "from": "Keyboard.Up", "when": "Application.CameraFirstPersonLookat", "to": "Actions.LONGITUDINAL_FORWARD" },
{ "from": "Keyboard.Up", "when": "Application.CameraThirdPerson", "to": "Actions.LONGITUDINAL_FORWARD" }, { "from": "Keyboard.Up", "when": "Application.CameraThirdPerson", "to": "Actions.LONGITUDINAL_FORWARD" },
@ -189,22 +191,22 @@
{ "from": "Keyboard.Down", "when": "Application.CameraLookAt", "to": "Actions.LONGITUDINAL_BACKWARD" }, { "from": "Keyboard.Down", "when": "Application.CameraLookAt", "to": "Actions.LONGITUDINAL_BACKWARD" },
{ "from": "Keyboard.Down", "when": "Application.CameraSelfie", "to": "Actions.LONGITUDINAL_FORWARD" }, { "from": "Keyboard.Down", "when": "Application.CameraSelfie", "to": "Actions.LONGITUDINAL_FORWARD" },
{ "from": "Keyboard.PgDown", "to": "Actions.VERTICAL_DOWN" }, { "from": "Keyboard.PgDown", "to": "Actions.VERTICAL_DOWN" },
{ "from": "Keyboard.PgUp", "to": "Actions.VERTICAL_UP" }, { "from": "Keyboard.PgUp", "to": "Actions.VERTICAL_UP" },
{ "from": "Keyboard.TouchpadDown", "to": "Actions.PITCH_DOWN" }, { "from": "Keyboard.TouchpadDown", "to": "Actions.PITCH_DOWN" },
{ "from": "Keyboard.TouchpadUp", "to": "Actions.PITCH_UP" }, { "from": "Keyboard.TouchpadUp", "to": "Actions.PITCH_UP" },
{ "from": "Keyboard.MouseWheelUp", "to": "Actions.LATERAL_RIGHT" }, { "from": "Keyboard.MouseWheelUp", "to": "Actions.LATERAL_RIGHT" },
{ "from": "Keyboard.MouseWheelDown", "to": "Actions.LATERAL_LEFT" }, { "from": "Keyboard.MouseWheelDown", "to": "Actions.LATERAL_LEFT" },
{ "from": "Keyboard.MouseWheelLeft", "to": "Actions.BOOM_OUT", "filters": [ { "type": "scale", "scale": 0.02 } ]}, { "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.MouseWheelRight", "to": "Actions.BOOM_IN", "filters": [ { "type": "scale", "scale": 0.02 } ]},
{ "from": "Keyboard.GesturePinchOut", "to": "Actions.BOOM_OUT"}, { "from": "Keyboard.GesturePinchOut", "to": "Actions.BOOM_OUT"},
{ "from": "Keyboard.GesturePinchIn", "to": "Actions.BOOM_IN"}, { "from": "Keyboard.GesturePinchIn", "to": "Actions.BOOM_IN"},
{ "from": "Keyboard.Space", "to": "Actions.VERTICAL_UP" }, { "from": "Keyboard.Space", "to": "Actions.VERTICAL_UP" },
{ "from": "Keyboard.R", "to": "Actions.ACTION1" }, { "from": "Keyboard.R", "to": "Actions.ACTION1" },
{ "from": "Keyboard.T", "to": "Actions.ACTION2" }, { "from": "Keyboard.T", "to": "Actions.ACTION2" },
{ "from": "Keyboard.Tab", "to": "Actions.ContextMenu" } { "from": "Keyboard.Tab", "to": "Actions.ContextMenu" }
] ]
} }