1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-03-31 22:22:14 +02:00

feat: allow null in keybindings

This commit is contained in:
Ryooooooga 2022-10-15 22:17:00 +09:00
parent 36c6462a53
commit 14ec0cd92e
No known key found for this signature in database
GPG Key ID: 07CF200DFCC20C25
3 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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
}

View File

@ -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
}