mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-31 14:24:25 +03:00
Add field Alternative to gui.Binding
Document and use alternative keybinding for generating cheatsheet. Add alt keybinding fn+up/down for scroll up/down actions. Also run `go run scripts/generate_cheatsheet.go`.
This commit is contained in:
committed by
Jesse Duffield
parent
357b8fa98f
commit
97f060d38d
@ -13,6 +13,7 @@ type Binding struct {
|
||||
Key interface{} // FIXME: find out how to get `gocui.Key | rune`
|
||||
Modifier gocui.Modifier
|
||||
Description string
|
||||
Alternative string
|
||||
}
|
||||
|
||||
// GetDisplayStrings returns the display string of a file
|
||||
@ -75,15 +76,17 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
|
||||
Modifier: gocui.ModNone,
|
||||
Handler: gui.quit,
|
||||
}, {
|
||||
ViewName: "",
|
||||
Key: gocui.KeyPgup,
|
||||
Modifier: gocui.ModNone,
|
||||
Handler: gui.scrollUpMain,
|
||||
ViewName: "",
|
||||
Key: gocui.KeyPgup,
|
||||
Modifier: gocui.ModNone,
|
||||
Handler: gui.scrollUpMain,
|
||||
Alternative: "fn+up",
|
||||
}, {
|
||||
ViewName: "",
|
||||
Key: gocui.KeyPgdn,
|
||||
Modifier: gocui.ModNone,
|
||||
Handler: gui.scrollDownMain,
|
||||
ViewName: "",
|
||||
Key: gocui.KeyPgdn,
|
||||
Modifier: gocui.ModNone,
|
||||
Handler: gui.scrollDownMain,
|
||||
Alternative: "fn+down",
|
||||
}, {
|
||||
ViewName: "",
|
||||
Key: gocui.KeyCtrlU,
|
||||
|
Reference in New Issue
Block a user