diff --git a/docs/Config.md b/docs/Config.md index d0d90ea31..937fc847d 100644 --- a/docs/Config.md +++ b/docs/Config.md @@ -436,6 +436,8 @@ gui: For all possible keybinding options, check [Custom_Keybindings.md](https://github.com/jesseduffield/lazygit/blob/master/docs/keybindings/Custom_Keybindings.md) +You can disable certain key bindings by specifying `null`. + ### Example Keybindings For Colemak Users ```yaml diff --git a/pkg/gui/keybindings/keybindings.go b/pkg/gui/keybindings/keybindings.go index a59180b56..09833944f 100644 --- a/pkg/gui/keybindings/keybindings.go +++ b/pkg/gui/keybindings/keybindings.go @@ -179,6 +179,5 @@ func GetKey(key string) types.Key { } else if runeCount == 1 { return []rune(key)[0] } - log.Fatal("Key empty for keybinding: " + strings.ToLower(key)) return nil } diff --git a/pkg/gui/options_menu_panel.go b/pkg/gui/options_menu_panel.go index 909c97fc8..68c8aa49d 100644 --- a/pkg/gui/options_menu_panel.go +++ b/pkg/gui/options_menu_panel.go @@ -58,7 +58,7 @@ func (gui *Gui) handleCreateOptionsMenu() error { OpensMenu: binding.OpensMenu, Label: binding.Description, OnPress: func() error { - if binding.Key == nil { + if binding.Handler == nil { return nil }