mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-15 00:15:32 +02:00
feat: allow null
in keybindings
This commit is contained in:
@ -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)
|
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
|
### Example Keybindings For Colemak Users
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
@ -179,6 +179,5 @@ func GetKey(key string) types.Key {
|
|||||||
} else if runeCount == 1 {
|
} else if runeCount == 1 {
|
||||||
return []rune(key)[0]
|
return []rune(key)[0]
|
||||||
}
|
}
|
||||||
log.Fatal("Key empty for keybinding: " + strings.ToLower(key))
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ func (gui *Gui) handleCreateOptionsMenu() error {
|
|||||||
OpensMenu: binding.OpensMenu,
|
OpensMenu: binding.OpensMenu,
|
||||||
Label: binding.Description,
|
Label: binding.Description,
|
||||||
OnPress: func() error {
|
OnPress: func() error {
|
||||||
if binding.Key == nil {
|
if binding.Handler == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user