diff --git a/ghid/keyboard.go b/ghid/keyboard.go index 7cd5537..096189f 100644 --- a/ghid/keyboard.go +++ b/ghid/keyboard.go @@ -273,6 +273,9 @@ func (k *Keyboard) CurrentKeymap() Keymap { if ok { return keymap } + if k.keymaps == nil { + k.keymaps = make(map[string]Keymap) + } k.keymaps[k.KeymapOrder[k.currentKeyMap]] = LoadKeymap(k.KeymapOrder[k.currentKeyMap], k.KeymapPath) return k.keymaps[k.KeymapOrder[k.currentKeyMap]] }