1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

extend cheatsheet generator to contain context based keybindings

This commit is contained in:
Jesse Duffield
2019-03-02 18:45:18 +11:00
parent 8c0ea8f45f
commit 7a170bbccf
4 changed files with 72 additions and 42 deletions

View File

@ -13,7 +13,6 @@ type Binding struct {
Key interface{} // FIXME: find out how to get `gocui.Key | rune`
Modifier gocui.Modifier
Description string
panic bool
}
// GetDisplayStrings returns the display string of a file
@ -32,10 +31,6 @@ func (b *Binding) GetKey() string {
key = int(b.Key.(gocui.Key))
}
if b.panic {
panic(key)
}
// special keys
switch key {
case 27: