From b1ba1142db453fbc174f739f45b57b26a1371499 Mon Sep 17 00:00:00 2001 From: cyp0633 Date: Wed, 31 Aug 2022 16:02:34 +0800 Subject: [PATCH] Fix: crash on set device 3-8 keymap --- devices/const.go | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/devices/const.go b/devices/const.go index b2a1932..16d677e 100644 --- a/devices/const.go +++ b/devices/const.go @@ -33,12 +33,12 @@ var keymap = [][]string{ {}, // left blank intentionally {"", "q", "e", "r", "w", "s", "a", "d", "enter"}, // device 0x01 (master) {"", "a", "b", "c", "up", "down", "left", "right", "enter"}, // device 0x02 - {}, // device 0x03 - {}, // device 0x04 - {}, // device 0x05 - {}, // device 0x06 - {}, // device 0x07 - {}, // device 0x08 + {"", "", "", "", "", "", "", "", ""}, // device 0x03 + {"", "", "", "", "", "", "", "", ""}, // device 0x04 + {"", "", "", "", "", "", "", "", ""}, // device 0x05 + {"", "", "", "", "", "", "", "", ""}, // device 0x06 + {"", "", "", "", "", "", "", "", ""}, // device 0x07 + {"", "", "", "", "", "", "", "", ""}, // device 0x08 } var keymap_preset map[string]([][]string) = map[string]([][]string){ @@ -46,23 +46,24 @@ var keymap_preset map[string]([][]string) = map[string]([][]string){ {}, // left blank intentionally {"", "q", "e", "r", "w", "s", "a", "d", "enter"}, // device 0x01 (master) {"", "a", "b", "c", "up", "down", "left", "right", "enter"}, // device 0x02 - {}, // device 0x03 - {}, // device 0x04 - {}, // device 0x05 - {}, // device 0x06 - {}, // device 0x07 - {}, // device 0x08 + {"", "", "", "", "", "", "", "", ""}, // device 0x03 + {"", "", "", "", "", "", "", "", ""}, // device 0x04 + {"", "", "", "", "", "", "", "", ""}, // device 0x05 + {"", "", "", "", "", "", "", "", ""}, // device 0x06 + {"", "", "", "", "", "", "", "", ""}, // device 0x07 + {"", "", "", "", "", "", "", "", ""}, // device 0x08 }, + "GenshinImpact": { {}, // left blank intentionally {"", "e", "q", "space", "w", "s", "a", "d", "lclick"}, // device 0x01 (master) {"", "1", "2", "3", "f", "", "", "", "rclick"}, // device 0x02 - {}, // device 0x03 - {}, // device 0x04 - {}, // device 0x05 - {}, // device 0x06 - {}, // device 0x07 - {}, // device 0x08 + {"", "", "", "", "", "", "", "", ""}, // device 0x03 + {"", "", "", "", "", "", "", "", ""}, // device 0x04 + {"", "", "", "", "", "", "", "", ""}, // device 0x05 + {"", "", "", "", "", "", "", "", ""}, // device 0x06 + {"", "", "", "", "", "", "", "", ""}, // device 0x07 + {"", "", "", "", "", "", "", "", ""}, // device 0x08 }, "ForestIceFire": {}, }