Do not panic if key is not in keymap
This commit is contained in:
parent
ef46068793
commit
8b4a2dc9f9
2
main.go
2
main.go
@ -55,7 +55,7 @@ func changeKeymap(r rune, keys map[string]Keys, args Args, hidg0 *os.File, curre
|
|||||||
Press([8]byte{LCTRL, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00}, hidg0)
|
Press([8]byte{LCTRL, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00}, hidg0)
|
||||||
*currentKeyMap++
|
*currentKeyMap++
|
||||||
if *currentKeyMap == len(keys) {
|
if *currentKeyMap == len(keys) {
|
||||||
panic("key not in keymap")
|
fmt.Println("key not in keymap: " + string(r))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user