From 8b4a2dc9f94bc8c2b16c708c2ee25fa223fae610 Mon Sep 17 00:00:00 2001 From: lordwelch Date: Fri, 24 Nov 2017 21:48:21 -0700 Subject: [PATCH] Do not panic if key is not in keymap --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 1c9ab7b..bfa10f8 100644 --- a/main.go +++ b/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) *currentKeyMap++ if *currentKeyMap == len(keys) { - panic("key not in keymap") + fmt.Println("key not in keymap: " + string(r)) } } }