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
11 11
12// Assumes you only have the default keyboard connected12// Assumes you only have the default keyboard connected
13 13
14Object.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
14// Resets every device to its default key bindings:20// Resets every device to its default key bindings:
15Controller.resetAllDeviceBindings();21Controller.resetAllDeviceBindings();
16 22