diff --git a/config-tool-web/examples.js b/config-tool-web/examples.js index e0a208d5..d0985949 100644 --- a/config-tool-web/examples.js +++ b/config-tool-web/examples.js @@ -10066,7 +10066,701 @@ const examples = [ ], "quirks": [] } + }, + { + 'description': 'Xbox controller (Bluetooth) adapter for Switch 2', + 'config': { + "version": 17, + "unmapped_passthrough_layers": [], + "partial_scroll_timeout": 1000000, + "tap_hold_threshold": 200000, + "gpio_debounce_time_ms": 5, + "interval_override": 0, + "our_descriptor_number": 6, + "ignore_auth_dev_inputs": false, + "input_labels": 1, + "mappings": [ + { + "target_usage": "0xfff90001", + "source_usage": "0xfff50001", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0xfff90002", + "source_usage": "0xfff50002", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0xfff90003", + "source_usage": "0xfff50003", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0xfff90004", + "source_usage": "0xfff50004", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0x00010030", + "source_usage": "0x00010030", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0x00010031", + "source_usage": "0x00010031", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0x00010032", + "source_usage": "0x00010032", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0x00010035", + "source_usage": "0x00010035", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0x00090002", + "source_usage": "0x00090001", + "source_name": "A", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0x00090003", + "source_usage": "0x00090002", + "source_name": "B", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0x00090001", + "source_usage": "0x00090004", + "source_name": "X", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0x00090004", + "source_usage": "0x00090005", + "source_name": "Y", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0x00090005", + "source_usage": "0x00090007", + "source_name": "LB", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0x00090006", + "source_usage": "0x00090008", + "source_name": "RB", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0x00090007", + "source_usage": "0xfff30002", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0x00090008", + "source_usage": "0xfff30003", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0x0009000b", + "source_usage": "0x0009000e", + "source_name": "LSB", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0x0009000c", + "source_usage": "0x0009000f", + "source_name": "RSB", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0x00090009", + "source_usage": "0x0009000b", + "source_name": "View", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0x0009000a", + "source_usage": "0x0009000c", + "source_name": "Menu", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0x0009000d", + "source_usage": "0x0009000d", + "source_name": "Guide", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + } + ], + "macros": [ + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [] + ], + "expressions": [ + "/*\nXbox controllers in Bluetooth mode report dpad directions as 1..8\n(N, NE, E, SE, S, SW, W, NW) with 0 as neutral.\n*/ eol eol 0x00010039 input_state 6000 eq eol 0x00010039 input_state 7000 eq bitwise_or eol 0x00010039 input_state 8000 eq bitwise_or eol 1000 store /* left */ eol eol 0x00010039 input_state 2000 eq eol 0x00010039 input_state 3000 eq bitwise_or eol 0x00010039 input_state 4000 eq bitwise_or eol 2000 store /* right */ eol eol 0x00010039 input_state 8000 eq eol 0x00010039 input_state 1000 eq bitwise_or eol 0x00010039 input_state 2000 eq bitwise_or eol 3000 store /* up */ eol eol 0x00010039 input_state 4000 eq eol 0x00010039 input_state 5000 eq bitwise_or eol 0x00010039 input_state 6000 eq bitwise_or eol 4000 store /* down */", + "0x000200c5 input_state_scaled eol 63000 gt", + "0x000200c4 input_state_scaled eol 63000 gt", + "", + "", + "", + "", + "" + ], + "macro_entry_duration": 1, + "gpio_output_mode": 0, + "quirks": [] + } + }, + { + 'description': 'Xbox controller (USB) adapter for Switch 2', + 'config': { + "version": 17, + "unmapped_passthrough_layers": [], + "partial_scroll_timeout": 1000000, + "tap_hold_threshold": 200000, + "gpio_debounce_time_ms": 5, + "interval_override": 0, + "our_descriptor_number": 6, + "ignore_auth_dev_inputs": false, + "input_labels": 1, + "mappings": [ + { + "target_usage": "0xfff90001", + "source_usage": "0x0009000b", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0xfff90002", + "source_usage": "0x0009000c", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0xfff90003", + "source_usage": "0x00090009", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0xfff90004", + "source_usage": "0x0009000a", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0x00010030", + "source_usage": "0x00010030", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0x00010031", + "source_usage": "0x00010031", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0x00010032", + "source_usage": "0x00010032", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0x00010035", + "source_usage": "0x00010035", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0x00090002", + "source_usage": "0x00090005", + "source_name": "A", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0x00090003", + "source_usage": "0x00090006", + "source_name": "B", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0x00090001", + "source_usage": "0x00090007", + "source_name": "X", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0x00090004", + "source_usage": "0x00090008", + "source_name": "Y", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0x00090005", + "source_usage": "0x0009000d", + "source_name": "LB", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0x00090006", + "source_usage": "0x0009000e", + "source_name": "RB", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0x00090007", + "source_usage": "0xfff30001", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0x00090008", + "source_usage": "0xfff30002", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0x0009000b", + "source_usage": "0x0009000f", + "source_name": "LSB", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0x0009000c", + "source_usage": "0x00090010", + "source_name": "RSB", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0x00090009", + "source_usage": "0x00090004", + "source_name": "View", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0x0009000a", + "source_usage": "0x00090003", + "source_name": "Menu", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + }, + { + "target_usage": "0x0009000d", + "source_usage": "0x00090011", + "source_name": "Guide", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false, + "source_port": 0, + "target_port": 0 + } + ], + "macros": [ + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [] + ], + "expressions": [ + "0x000200c5 input_state_scaled eol 63000 gt", + "0x000200c4 input_state_scaled eol 63000 gt", + "", + "", + "", + "", + "", + "" + ], + "macro_entry_duration": 1, + "gpio_output_mode": 0, + "quirks": [] + } } ]; -export default examples; +export default examples; \ No newline at end of file diff --git a/config-tool-web/index.html b/config-tool-web/index.html index 43d396bc..48244412 100644 --- a/config-tool-web/index.html +++ b/config-tool-web/index.html @@ -186,6 +186,7 @@