Fix: crash on set device 3-8 keymap

This commit is contained in:
cyp0633 2022-08-31 16:02:34 +08:00
parent 0cf083b071
commit b1ba1142db
Signed by: cyp0633
GPG Key ID: CF90D09FB1FDCE45
1 changed files with 19 additions and 18 deletions

View File

@ -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": {},
}