History

more work on exposing device inputs as JavaScript named constants

Brad Hefta-Gaub committed 11 years ago

Commit d3ee9b01 parent 37f530f5 files · +67 −11Browse files

Showing the changes to examples/example/scripts/controllerScriptingExamples.js (1 of 5 files). Show all

Unified · Split

examples/example/scripts/controllerScriptingExamples.js+6−0
@@ -11,6 +11,12 @@ · 10 unmodified lines
1111
1212 // Assumes you only have the default keyboard connected
1313
14+Object.keys(Controller.Hardware).forEach(function (deviceName) {
15+ Object.keys(Controller.Hardware[deviceName]).forEach(function (input) {
16+ print(deviceName + "." + input + ":" + Controller.Hardware[deviceName][input]);
17+ });
18+});
19+
1420 // Resets every device to its default key bindings:
1521 Controller.resetAllDeviceBindings();
1622