Add media key bindings, update docs

All bindings are disabled by default. This is to prevent confusing
behaviour from users who do not know about the new bindings. Forcing
users to manually set up their bindings will also enable them to play
around with the SteamVR bindings interface, which allows for much more
versatile binding options that our current offerings.

All actions are curently in main action set. If the selection of
bindings was greatly expanded it could be beneficial to encapsulate the
options more. The current code is more intended as a proof of concept
until our full binding needs have been uncovered.

The processInputBindings function should probably also be split into
several functions of related bindings, as the amount of bindings grows.
This commit is contained in:
Vasily
2019-01-21 21:19:28 +01:00
parent 3a62ec89be
commit 667711246e
7 changed files with 117 additions and 47 deletions
+21 -3
View File
@@ -7,7 +7,22 @@
],
"actions": [
{
"name": "/actions/main/in/PlayNextTrack",
"name": "/actions/main/in/NextTrack",
"requirement": "optional",
"type": "boolean"
},
{
"name": "/actions/main/in/PreviousTrack",
"requirement": "optional",
"type": "boolean"
},
{
"name": "/actions/main/in/PausePlayTrack",
"requirement": "optional",
"type": "boolean"
},
{
"name": "/actions/main/in/StopTrack",
"requirement": "optional",
"type": "boolean"
}
@@ -22,9 +37,12 @@
{
"language_tag": "en",
"/actions/main" : "My Game Actions",
"/actions/main" : "Advanced Settings Actions",
"/actions/main/in/PlayNextTrack" : "Play Next Track"
"/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"
}
]
}
@@ -3,40 +3,12 @@
"app_key" : "matzman666.advancedsettings",
"bindings" : {
"/actions/main" : {
"sources" : [
{
"inputs" : {
"click" : {
"output" : "/actions/main/in/playnexttrack"
}
},
"mode" : "button",
"path" : "/user/hand/left/input/application_menu"
},
{
"inputs" : {
"click" : {
"output" : "/actions/main/in/playnexttrack"
}
},
"mode" : "button",
"path" : "/user/hand/right/input/application_menu"
},
{
"inputs" : {
"click" : {
"output" : "/actions/main/in/playnexttrack"
}
},
"mode" : "button",
"path" : "/user/hand/right/input/grip"
}
]
"sources" : []
}
},
"controller_type" : "vive_controller",
"description" : "",
"name" : "My My Test configuration for Vive Controller",
"description" : "Nothing has been bound by default.",
"name" : "Empty Bindings (default)",
"options" : {},
"simulated_actions" : []
}