Refactor actions into separate action sets (#122)
* Fix indentation in action manifest * Rename action sets to drop unnecessary prefix notation Since the variable is in the action_sets namespace it does not make sense to prepend it with an identifier for it being constant, or a set. * Rename input keys to drop prefix notation The vars are in a namespace that only contains constant inputs, it doesn't make sense to prepend it to every var. * Rename actions to drop prefixes It is implicit that actions are const values for sets, therefore the prefix is not needed. * Remove unneeded action set member func * Move active action set in preparation for more action sets * Move action strings above class Class is not able to use variables in namespaces, which is stupid. * Move sets into member variable * Split music into separate action set * Convert action_manifest.json to spaces only * Refactor actions into separate action sets * Rename main set to haptic * Reorder action sets The haptics and misc sets are misc bindings. * format * fixed manifest path issue * Change path concat to use QDir The old way was not platform independent. * Move accessibility actions to motion set * Remove "(Held)" from action name Might be confusing for end users. * Replace slash with platform independent separator * Make paths output native paths
This commit is contained in:
@@ -6,151 +6,166 @@
|
||||
},
|
||||
{
|
||||
"controller_type" : "generic",
|
||||
"binding_url" : "default_action_manifests/generic_hmd_defaults.json"
|
||||
"binding_url" : "default_action_manifests/generic_hmd_defaults.json"
|
||||
},
|
||||
{
|
||||
"controller_type" : "vive",
|
||||
"binding_url" : "default_action_manifests/vive_hmd_defaults.json"
|
||||
"binding_url" : "default_action_manifests/vive_hmd_defaults.json"
|
||||
}
|
||||
],
|
||||
"actions": [
|
||||
{
|
||||
"name": "/actions/main/in/NextTrack",
|
||||
"name": "/actions/music/in/NextTrack",
|
||||
"requirement": "optional",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "/actions/main/in/PreviousTrack",
|
||||
"name": "/actions/music/in/PreviousTrack",
|
||||
"requirement": "optional",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "/actions/main/in/PausePlayTrack",
|
||||
"name": "/actions/music/in/PausePlayTrack",
|
||||
"requirement": "optional",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "/actions/main/in/StopTrack",
|
||||
"name": "/actions/music/in/StopTrack",
|
||||
"requirement": "optional",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "/actions/main/in/ProxSensor",
|
||||
"requirement": "optional",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "/actions/main/out/HapticsLeft",
|
||||
"type": "vibration"
|
||||
},
|
||||
{
|
||||
"name": "/actions/main/out/HapticsRight",
|
||||
"type": "vibration"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "/actions/main/in/LeftHandSpaceTurn",
|
||||
"name": "/actions/haptic/in/ProxSensor",
|
||||
"requirement": "optional",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "/actions/main/in/RightHandSpaceTurn",
|
||||
"name": "/actions/haptic/out/HapticsLeft",
|
||||
"type": "vibration"
|
||||
},
|
||||
{
|
||||
"name": "/actions/haptic/out/HapticsRight",
|
||||
"type": "vibration"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "/actions/motion/in/LeftHandSpaceTurn",
|
||||
"requirement": "optional",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "/actions/main/in/LeftHandSpaceDrag",
|
||||
"name": "/actions/motion/in/RightHandSpaceTurn",
|
||||
"requirement": "optional",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "/actions/main/in/RightHandSpaceDrag",
|
||||
"name": "/actions/motion/in/LeftHandSpaceDrag",
|
||||
"requirement": "optional",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "/actions/main/in/OptionalOverrideLeftHandSpaceTurn",
|
||||
"name": "/actions/motion/in/RightHandSpaceDrag",
|
||||
"requirement": "optional",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "/actions/main/in/OptionalOverrideRightHandSpaceTurn",
|
||||
"name": "/actions/motion/in/OptionalOverrideLeftHandSpaceTurn",
|
||||
"requirement": "optional",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "/actions/main/in/OptionalOverrideLeftHandSpaceDrag",
|
||||
"name": "/actions/motion/in/OptionalOverrideRightHandSpaceTurn",
|
||||
"requirement": "optional",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "/actions/main/in/OptionalOverrideRightHandSpaceDrag",
|
||||
"name": "/actions/motion/in/OptionalOverrideLeftHandSpaceDrag",
|
||||
"requirement": "optional",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "/actions/main/in/SwapSpaceDragToLeftHandOverride",
|
||||
"name": "/actions/motion/in/OptionalOverrideRightHandSpaceDrag",
|
||||
"requirement": "optional",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "/actions/main/in/SwapSpaceDragToRightHandOverride",
|
||||
"name": "/actions/motion/in/SwapSpaceDragToLeftHandOverride",
|
||||
"requirement": "optional",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "/actions/main/in/GravityToggle",
|
||||
"name": "/actions/motion/in/SwapSpaceDragToRightHandOverride",
|
||||
"requirement": "optional",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "/actions/main/in/GravityReverse",
|
||||
"name": "/actions/motion/in/GravityToggle",
|
||||
"requirement": "optional",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "/actions/main/in/HeightToggle",
|
||||
"name": "/actions/motion/in/GravityReverse",
|
||||
"requirement": "optional",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "/actions/main/in/ResetOffsets",
|
||||
"name": "/actions/motion/in/ResetOffsets",
|
||||
"requirement": "optional",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "/actions/main/in/SnapTurnLeft",
|
||||
"name": "/actions/motion/in/HeightToggle",
|
||||
"requirement": "optional",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "/actions/main/in/SnapTurnRight",
|
||||
"name": "/actions/motion/in/SnapTurnLeft",
|
||||
"requirement": "optional",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "/actions/main/in/XAxisLockToggle",
|
||||
"name": "/actions/motion/in/SnapTurnRight",
|
||||
"requirement": "optional",
|
||||
"type": "boolean"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "/actions/misc/in/XAxisLockToggle",
|
||||
"requirement": "optional",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "/actions/main/in/YAxisLockToggle",
|
||||
"name": "/actions/misc/in/YAxisLockToggle",
|
||||
"requirement": "optional",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "/actions/main/in/ZAxisLockToggle",
|
||||
"name": "/actions/misc/in/ZAxisLockToggle",
|
||||
"requirement": "optional",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "/actions/main/in/PushToTalk",
|
||||
"name": "/actions/misc/in/PushToTalk",
|
||||
"requirement": "optional",
|
||||
"type": "boolean"
|
||||
}
|
||||
],
|
||||
"action_sets": [
|
||||
{
|
||||
"name": "/actions/main",
|
||||
"name": "/actions/motion",
|
||||
"usage": "leftright"
|
||||
},
|
||||
{
|
||||
"name": "/actions/music",
|
||||
"usage": "leftright"
|
||||
},
|
||||
{
|
||||
"name": "/actions/misc",
|
||||
"usage": "leftright"
|
||||
},
|
||||
{
|
||||
"name": "/actions/haptic",
|
||||
"usage": "leftright"
|
||||
}
|
||||
],
|
||||
@@ -158,35 +173,41 @@
|
||||
{
|
||||
"language_tag": "en_US",
|
||||
|
||||
"/actions/main" : "Advanced Settings Actions",
|
||||
"/actions/haptic" : "Haptics",
|
||||
"/actions/music" : "Music",
|
||||
"/actions/misc" : "Misc",
|
||||
"/actions/accessibility" : "Accessibility",
|
||||
"/actions/motion" : "Motion",
|
||||
|
||||
"/actions/main/in/NextTrack" : "Play Next Track",
|
||||
"/actions/main/in/PreviousTrack" : "Play Previous Track",
|
||||
"/actions/main/in/PausePlayTrack" : "Pause/Play Track",
|
||||
"/actions/main/in/StopTrack" : "Stop Track",
|
||||
"/actions/main/out/HapticsLeft" : "Haptics Left",
|
||||
"/actions/main/out/HapticsRight" : " Haptics Right",
|
||||
"/actions/main/in/LeftHandSpaceTurn" : "Left Hand Space Turn",
|
||||
"/actions/main/in/RightHandSpaceTurn" : "Right Hand Space Turn",
|
||||
"/actions/main/in/LeftHandSpaceDrag" : "Left Hand Space Drag",
|
||||
"/actions/main/in/RightHandSpaceDrag" : "Right Hand Space Drag",
|
||||
"/actions/main/in/OptionalOverrideLeftHandSpaceTurn" : "(Optional Override) Left Hand Space Turn",
|
||||
"/actions/main/in/OptionalOverrideRightHandSpaceTurn" : "(Optional Override) Right Hand Space Turn",
|
||||
"/actions/main/in/OptionalOverrideLeftHandSpaceDrag" : "(Optional Override) Left Hand Space Drag",
|
||||
"/actions/main/in/OptionalOverrideRightHandSpaceDrag" : "(Optional Override) Right Hand Space Drag",
|
||||
"/actions/main/in/SwapSpaceDragToLeftHandOverride" : "Swap Active Space Drag to Left Hand (Override)",
|
||||
"/actions/main/in/SwapSpaceDragToRightHandOverride" : "Swap Active Space Drag to Right Hand (Override)",
|
||||
"/actions/main/in/GravityToggle" : "Gravity Toggle",
|
||||
"/actions/main/in/GravityReverse" : "Gravity Reverse (Held)",
|
||||
"/actions/main/in/HeightToggle" : "Height Toggle",
|
||||
"/actions/main/in/ResetOffsets" : "Reset Offsets",
|
||||
"/actions/main/in/SnapTurnLeft" : "Snap-Turn Left",
|
||||
"/actions/main/in/SnapTurnRight" : "Snap-Turn Right",
|
||||
"/actions/main/in/XAxisLockToggle" : "X-Axis Lock Toggle",
|
||||
"/actions/main/in/YAxisLockToggle" : "Y-Axis Lock Toggle",
|
||||
"/actions/main/in/ZAxisLockToggle" : "Z-Axis Lock Toggle",
|
||||
"/actions/music/in/NextTrack" : "Play Next Track",
|
||||
"/actions/music/in/PreviousTrack" : "Play Previous Track",
|
||||
"/actions/music/in/PausePlayTrack" : "Pause/Play Track",
|
||||
"/actions/music/in/StopTrack" : "Stop Track",
|
||||
|
||||
"/actions/main/in/PushToTalk" : "Push To Talk"
|
||||
"/actions/motion/out/HapticsLeft" : "Haptics Left",
|
||||
"/actions/motion/out/HapticsRight" : " Haptics Right",
|
||||
"/actions/motion/in/LeftHandSpaceTurn" : "Left Hand Space Turn",
|
||||
"/actions/motion/in/RightHandSpaceTurn" : "Right Hand Space Turn",
|
||||
"/actions/motion/in/LeftHandSpaceDrag" : "Left Hand Space Drag",
|
||||
"/actions/motion/in/RightHandSpaceDrag" : "Right Hand Space Drag",
|
||||
"/actions/motion/in/OptionalOverrideLeftHandSpaceTurn" : "(Optional Override) Left Hand Space Turn",
|
||||
"/actions/motion/in/OptionalOverrideRightHandSpaceTurn" : "(Optional Override) Right Hand Space Turn",
|
||||
"/actions/motion/in/OptionalOverrideLeftHandSpaceDrag" : "(Optional Override) Left Hand Space Drag",
|
||||
"/actions/motion/in/OptionalOverrideRightHandSpaceDrag" : "(Optional Override) Right Hand Space Drag",
|
||||
"/actions/motion/in/SwapSpaceDragToLeftHandOverride" : "Swap Active Space Drag to Left Hand (Override)",
|
||||
"/actions/motion/in/SwapSpaceDragToRightHandOverride" : "Swap Active Space Drag to Right Hand (Override)",
|
||||
"/actions/motion/in/GravityToggle" : "Gravity Toggle",
|
||||
"/actions/motion/in/GravityReverse" : "Gravity Reverse",
|
||||
"/actions/motion/in/ResetOffsets" : "Reset Offsets",
|
||||
|
||||
"/actions/accessibility/in/HeightToggle" : "Height Toggle",
|
||||
"/actions/accessibility/in/SnapTurnLeft" : "Snap-Turn Left",
|
||||
"/actions/accessibility/in/SnapTurnRight" : "Snap-Turn Right",
|
||||
|
||||
"/actions/misc/in/XAxisLockToggle" : "X-Axis Lock Toggle",
|
||||
"/actions/misc/in/YAxisLockToggle" : "Y-Axis Lock Toggle",
|
||||
"/actions/misc/in/ZAxisLockToggle" : "Z-Axis Lock Toggle",
|
||||
"/actions/misc/in/PushToTalk" : "Push To Talk"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user