From c099d8a6a02424056c69bf8db3c66757b7068080 Mon Sep 17 00:00:00 2001 From: Jacek Fedorynski Date: Sat, 7 Oct 2023 18:40:35 +0200 Subject: [PATCH] Add Xbox Adaptive Controller -> Switch example Please note the Xbox Adaptive Controller currently only works with the Bluetooth version of HID Remapper as it doesn't speak standard HID over USB. --- config-tool-web/examples.js | 257 ++++++++++++++++++++++++++++++++++++ 1 file changed, 257 insertions(+) diff --git a/config-tool-web/examples.js b/config-tool-web/examples.js index e5fffe6..9696b10 100644 --- a/config-tool-web/examples.js +++ b/config-tool-web/examples.js @@ -2572,6 +2572,263 @@ const examples = [ ] } }, + { + 'description': 'Xbox Adaptive Controller adapter for Switch', + 'config': { + "version": 9, + "unmapped_passthrough_layers": [], + "partial_scroll_timeout": 1000000, + "tap_hold_threshold": 200000, + "gpio_debounce_time_ms": 5, + "interval_override": 0, + "our_descriptor_number": 2, + "ignore_auth_dev_inputs": false, + "mappings": [ + { + "target_usage": "0x00010039", + "source_usage": "0xfff30001", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false + }, + { + "target_usage": "0x00010030", + "source_usage": "0xfff30002", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false + }, + { + "target_usage": "0x00010031", + "source_usage": "0xfff30003", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false + }, + { + "target_usage": "0x00010032", + "source_usage": "0xfff30004", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false + }, + { + "target_usage": "0x00010035", + "source_usage": "0xfff30005", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false + }, + { + "target_usage": "0x00090002", + "source_usage": "0x00090001", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false + }, + { + "target_usage": "0x00090003", + "source_usage": "0x00090002", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false + }, + { + "target_usage": "0x00090001", + "source_usage": "0x00090004", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false + }, + { + "target_usage": "0x00090004", + "source_usage": "0x00090005", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false + }, + { + "target_usage": "0x00090005", + "source_usage": "0x00090007", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false + }, + { + "target_usage": "0x00090006", + "source_usage": "0x00090008", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false + }, + { + "target_usage": "0x00090007", + "source_usage": "0xfff30006", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false + }, + { + "target_usage": "0x00090008", + "source_usage": "0xfff30007", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false + }, + { + "target_usage": "0x0009000b", + "source_usage": "0x0009000e", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false + }, + { + "target_usage": "0x0009000c", + "source_usage": "0x0009000f", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false + }, + { + "target_usage": "0x00090009", + "source_usage": "0x0009000b", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false + }, + { + "target_usage": "0x0009000a", + "source_usage": "0x0009000c", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false + }, + { + "target_usage": "0x0009000d", + "source_usage": "0x0009000d", + "scaling": 1000, + "layers": [ + 0 + ], + "sticky": false, + "tap": false, + "hold": false + } + ], + "macros": [ + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [] + ], + "expressions": [ + "0x00010039 input_state -1000 add 9000 mod", + "0x00010030 input_state 125 mul 125 mul 250 mul", + "0x00010031 input_state 125 mul 125 mul 250 mul", + "0x00010032 input_state 125 mul 125 mul 250 mul", + "0x00010035 input_state 125 mul 125 mul 250 mul", + "0x000200c5 input_state 1023000 eq", + "0x000200c4 input_state 1023000 eq", + "" + ] + } + }, ]; export default examples;