OpenVRKnucklesBinding.h (12650B)
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */ 3 /* This Source Code Form is subject to the terms of the Mozilla Public 4 * License, v. 2.0. If a copy of the MPL was not distributed with this 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 7 #ifndef GFX_VR_BLINDING_OPENVRKNUCKLESBINDING_H 8 #define GFX_VR_BLINDING_OPENVRKNUCKLESBINDING_H 9 10 namespace mozilla { 11 namespace gfx { 12 13 struct OpenVRKnucklesBinding { 14 const char* binding = 15 // clang-format off 16 "{\n" 17 " \"version\" : \"0.1\", \n" 18 " \"controller_type\" : \"knuckles\", \n" 19 " \"description\" : \"Bindings for Firefox OpenVR for the Knuckles controller\", \n" 20 " \"name\" : \"Firefox bindings for Knuckles Controller\", \n" 21 " \"bindings\" : { \n" 22 " \"/actions/firefox\" : { \n" 23 " \"poses\" : [ \n" 24 " { \n" 25 " \"output\" : \"/actions/firefox/in/LHand_pose\", \n" 26 " \"path\" : \"/user/hand/left/pose/raw\" \n" 27 " },\n" 28 " { \n" 29 " \"output\" : \"/actions/firefox/in/RHand_pose\", \n" 30 " \"path\" : \"/user/hand/right/pose/raw\" \n" 31 " }\n" 32 " ],\n" 33 " \"haptics\" : [ \n" 34 " {\n" 35 " \"output\" : \"/actions/firefox/out/LHand_haptic\", \n" 36 " \"path\" : \"/user/hand/left/output/haptic\" \n" 37 " },\n" 38 " { \n" 39 " \"output\" : \"/actions/firefox/out/RHand_haptic\", \n" 40 " \"path\" : \"/user/hand/right/output/haptic\" \n" 41 " }\n" 42 " ],\n" 43 " \"sources\" : [ \n" 44 " {\n" 45 " \"inputs\" : { \n" 46 " \"position\" : { \n" 47 " \"output\" : \"/actions/firefox/in/LHand_trackpad_analog\" \n" 48 " }, \n" 49 " \"click\" : { \n" 50 " \"output\" : \"/actions/firefox/in/LHand_trackpad_pressed\" \n" 51 " }, \n" 52 " \"touch\" : { \n" 53 " \"output\" : \"/actions/firefox/in/LHand_trackpad_touched\" \n" 54 " } \n" 55 " }, \n" 56 " \"mode\" : \"trackpad\", \n" 57 " \"path\" : \"/user/hand/left/input/trackpad\" \n" 58 " },\n" 59 " {\n" 60 " \"inputs\" : { \n" 61 " \"position\" : { \n" 62 " \"output\" : \"/actions/firefox/in/RHand_trackpad_analog\" \n" 63 " }, \n" 64 " \"click\" : { \n" 65 " \"output\" : \"/actions/firefox/in/RHand_trackpad_pressed\" \n" 66 " }, \n" 67 " \"touch\" : { \n" 68 " \"output\" : \"/actions/firefox/in/RHand_trackpad_touched\" \n" 69 " } \n" 70 " }, \n" 71 " \"mode\" : \"trackpad\", \n" 72 " \"path\" : \"/user/hand/right/input/trackpad\" \n" 73 " }, \n" 74 " {\n" 75 " \"inputs\" : { \n" 76 " \"pull\" : { \n" 77 " \"output\" : \"/actions/firefox/in/LHand_trigger_value\" \n" 78 " } \n" 79 " },\n" 80 " \"mode\" : \"trigger\", \n" 81 " \"path\" : \"/user/hand/left/input/trigger\" \n" 82 " }, \n" 83 " {\n" 84 " \"inputs\" : { \n" 85 " \"pull\" : { \n" 86 " \"output\" : \"/actions/firefox/in/RHand_trigger_value\" \n" 87 " } \n" 88 " },\n" 89 " \"mode\" : \"trigger\", \n" 90 " \"path\" : \"/user/hand/right/input/trigger\" \n" 91 " }, \n" 92 " {\n" 93 " \"inputs\" : { \n" 94 " \"click\" : { \n" 95 " \"output\" : \"/actions/firefox/in/LHand_grip_pressed\" \n" 96 " }, \n" 97 " \"touch\" : { \n" 98 " \"output\" : \"/actions/firefox/in/LHand_grip_touched\" \n" 99 " } \n" 100 " }, \n" 101 " \"mode\" : \"button\", \n" 102 " \"path\" : \"/user/hand/left/input/grip\" \n" 103 " }, \n" 104 " {\n" 105 " \"inputs\" : { \n" 106 " \"click\" : { \n" 107 " \"output\" : \"/actions/firefox/in/RHand_grip_pressed\" \n" 108 " }, \n" 109 " \"touch\" : { \n" 110 " \"output\" : \"/actions/firefox/in/RHand_grip_touched\" \n" 111 " } \n" 112 " }, \n" 113 " \"mode\" : \"button\", \n" 114 " \"path\" : \"/user/hand/right/input/grip\" \n" 115 " }, \n" 116 " {\n" 117 " \"inputs\" : { \n" 118 " \"click\" : { \n" 119 " \"output\" : \"/actions/firefox/in/LHand_system_pressed\" \n" 120 " }, \n" 121 " \"touch\" : { \n" 122 " \"output\" : \"/actions/firefox/in/LHand_system_touched\" \n" 123 " } \n" 124 " },\n" 125 " \"mode\" : \"button\", \n" 126 " \"path\" : \"/user/hand/left/input/system\" \n" 127 " }, \n" 128 " {\n" 129 " \"inputs\" : { \n" 130 " \"click\" : { \n" 131 " \"output\" : \"/actions/firefox/in/RHand_system_pressed\" \n" 132 " }, \n" 133 " \"touch\" : { \n" 134 " \"output\" : \"/actions/firefox/in/RHand_system_touched\" \n" 135 " } \n" 136 " },\n" 137 " \"mode\" : \"button\", \n" 138 " \"path\" : \"/user/hand/right/input/system\" \n" 139 " }, \n" 140 " {\n" 141 " \"inputs\" : { \n" 142 " \"click\" : { \n" 143 " \"output\" : \"/actions/firefox/in/LHand_a_pressed\" \n" 144 " }, \n" 145 " \"touch\" : { \n" 146 " \"output\" : \"/actions/firefox/in/LHand_a_touched\" \n" 147 " } \n" 148 " },\n" 149 " \"mode\" : \"button\", \n" 150 " \"path\" : \"/user/hand/left/input/a\" \n" 151 " }, \n" 152 " {\n" 153 " \"inputs\" : { \n" 154 " \"click\" : { \n" 155 " \"output\" : \"/actions/firefox/in/RHand_a_pressed\" \n" 156 " }, \n" 157 " \"touch\" : { \n" 158 " \"output\" : \"/actions/firefox/in/RHand_a_touched\" \n" 159 " } \n" 160 " },\n" 161 " \"mode\" : \"button\", \n" 162 " \"path\" : \"/user/hand/right/input/a\" \n" 163 " }, \n" 164 " {\n" 165 " \"inputs\" : { \n" 166 " \"click\" : { \n" 167 " \"output\" : \"/actions/firefox/in/LHand_b_pressed\" \n" 168 " }, \n" 169 " \"touch\" : { \n" 170 " \"output\" : \"/actions/firefox/in/LHand_b_touched\" \n" 171 " } \n" 172 " },\n" 173 " \"mode\" : \"button\", \n" 174 " \"path\" : \"/user/hand/left/input/b\" \n" 175 " }, \n" 176 " {\n" 177 " \"inputs\" : { \n" 178 " \"click\" : { \n" 179 " \"output\" : \"/actions/firefox/in/RHand_b_pressed\" \n" 180 " }, \n" 181 " \"touch\" : { \n" 182 " \"output\" : \"/actions/firefox/in/RHand_b_touched\" \n" 183 " } \n" 184 " },\n" 185 " \"mode\" : \"button\", \n" 186 " \"path\" : \"/user/hand/right/input/b\" \n" 187 " }, \n" 188 " {\n" 189 " \"inputs\" : { \n" 190 " \"position\" : { \n" 191 " \"output\" : \"/actions/firefox/in/LHand_thumbstick_analog\" \n" 192 " }, \n" 193 " \"click\" : { \n" 194 " \"output\" : \"/actions/firefox/in/LHand_thumbstick_pressed\" \n" 195 " }, \n" 196 " \"touch\" : { \n" 197 " \"output\" : \"/actions/firefox/in/LHand_thumbstick_touched\" \n" 198 " } \n" 199 " }, \n" 200 " \"mode\" : \"joystick\", \n" 201 " \"path\" : \"/user/hand/left/input/thumbstick\" \n" 202 " },\n" 203 " {\n" 204 " \"inputs\" : { \n" 205 " \"position\" : { \n" 206 " \"output\" : \"/actions/firefox/in/RHand_thumbstick_analog\" \n" 207 " }, \n" 208 " \"click\" : { \n" 209 " \"output\" : \"/actions/firefox/in/RHand_thumbstick_pressed\" \n" 210 " }, \n" 211 " \"touch\" : { \n" 212 " \"output\" : \"/actions/firefox/in/RHand_thumbstick_touched\" \n" 213 " } \n" 214 " }, \n" 215 " \"mode\" : \"joystick\", \n" 216 " \"path\" : \"/user/hand/right/input/thumbstick\" \n" 217 " }, \n" 218 " {\n" 219 " \"inputs\" : { \n" 220 " \"pull\" : { \n" 221 " \"output\" : \"/actions/firefox/in/LHand_finger_index_value\" \n" 222 " } \n" 223 " }, \n" 224 " \"mode\" : \"trigger\", \n" 225 " \"path\" : \"/user/hand/left/input/finger/index\" \n" 226 " }, \n" 227 " {\n" 228 " \"inputs\" : { \n" 229 " \"pull\" : { \n" 230 " \"output\" : \"/actions/firefox/in/RHand_finger_index_value\" \n" 231 " } \n" 232 " }, \n" 233 " \"mode\" : \"trigger\", \n" 234 " \"path\" : \"/user/hand/right/input/finger/index\" \n" 235 " }, \n" 236 " {\n" 237 " \"inputs\" : { \n" 238 " \"pull\" : { \n" 239 " \"output\" : \"/actions/firefox/in/LHand_finger_middle_value\" \n" 240 " } \n" 241 " }, \n" 242 " \"mode\" : \"trigger\", \n" 243 " \"path\" : \"/user/hand/left/input/finger/middle\" \n" 244 " }, \n" 245 " {\n" 246 " \"inputs\" : { \n" 247 " \"pull\" : { \n" 248 " \"output\" : \"/actions/firefox/in/RHand_finger_middle_value\" \n" 249 " } \n" 250 " }, \n" 251 " \"mode\" : \"trigger\", \n" 252 " \"path\" : \"/user/hand/right/input/finger/middle\" \n" 253 " }, \n" 254 " {\n" 255 " \"inputs\" : { \n" 256 " \"pull\" : { \n" 257 " \"output\" : \"/actions/firefox/in/LHand_finger_ring_value\" \n" 258 " } \n" 259 " }, \n" 260 " \"mode\" : \"trigger\", \n" 261 " \"path\" : \"/user/hand/left/input/finger/ring\" \n" 262 " }, \n" 263 " {\n" 264 " \"inputs\" : { \n" 265 " \"pull\" : { \n" 266 " \"output\" : \"/actions/firefox/in/RHand_finger_ring_value\" \n" 267 " } \n" 268 " }, \n" 269 " \"mode\" : \"trigger\", \n" 270 " \"path\" : \"/user/hand/right/input/finger/ring\" \n" 271 " }, \n" 272 " {\n" 273 " \"inputs\" : { \n" 274 " \"pull\" : { \n" 275 " \"output\" : \"/actions/firefox/in/LHand_finger_pinky_value\" \n" 276 " } \n" 277 " }, \n" 278 " \"mode\" : \"trigger\", \n" 279 " \"path\" : \"/user/hand/left/input/finger/pinky\" \n" 280 " }, \n" 281 " {\n" 282 " \"inputs\" : { \n" 283 " \"pull\" : { \n" 284 " \"output\" : \"/actions/firefox/in/RHand_finger_pinky_value\" \n" 285 " } \n" 286 " }, \n" 287 " \"mode\" : \"trigger\", \n" 288 " \"path\" : \"/user/hand/right/input/finger/pinky\" \n" 289 " } \n" 290 " ]\n" 291 " }\n" 292 " }\n" 293 "}"; 294 // clang-format on 295 }; 296 297 } // namespace gfx 298 } // namespace mozilla 299 300 #endif // GFX_VR_BLINDING_OPENVRKNUCKLESBINDING_H