diff options
author | Suhas Karanth <sudo.suhas@gmail.com> | 2019-05-07 12:25:30 +0530 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2019-05-12 16:20:42 +1000 |
commit | e38d9d5f226a22e5299b82fe9c4ea46b7f7db120 (patch) | |
tree | a4c92a3dd877a79060d67f5a6840bf1ebd127700 | |
parent | 97f060d38d5f1d1b33e5826e86a5bc043294e376 (diff) |
Add alternatives for scroll actions to context map
-rw-r--r-- | docs/keybindings/Keybindings_en.md | 4 | ||||
-rw-r--r-- | docs/keybindings/Keybindings_nl.md | 4 | ||||
-rw-r--r-- | docs/keybindings/Keybindings_pl.md | 4 | ||||
-rw-r--r-- | pkg/gui/keybindings.go | 2 | ||||
-rw-r--r-- | scripts/generate_cheatsheet.go | 2 |
5 files changed, 9 insertions, 7 deletions
diff --git a/docs/keybindings/Keybindings_en.md b/docs/keybindings/Keybindings_en.md index a8160fcda..8f941ad22 100644 --- a/docs/keybindings/Keybindings_en.md +++ b/docs/keybindings/Keybindings_en.md @@ -98,8 +98,8 @@ ## Main (Normal) <pre> - <kbd>PgDn</kbd>: scroll down - <kbd>PgUp</kbd>: scroll up + <kbd>PgDn</kbd>: scroll down (fn+up) + <kbd>PgUp</kbd>: scroll up (fn+down) </pre> ## Main (Staging) diff --git a/docs/keybindings/Keybindings_nl.md b/docs/keybindings/Keybindings_nl.md index 92e77dfe4..9ed20165f 100644 --- a/docs/keybindings/Keybindings_nl.md +++ b/docs/keybindings/Keybindings_nl.md @@ -98,8 +98,8 @@ ## Hoofd (Normaal) <pre> - <kbd>PgDn</kbd>: scroll omlaag - <kbd>PgUp</kbd>: scroll omhoog + <kbd>PgDn</kbd>: scroll omlaag (fn+up) + <kbd>PgUp</kbd>: scroll omhoog (fn+down) </pre> ## Hoofd (Stage Lines/Hunks) diff --git a/docs/keybindings/Keybindings_pl.md b/docs/keybindings/Keybindings_pl.md index 2aa36acd7..0438c50ee 100644 --- a/docs/keybindings/Keybindings_pl.md +++ b/docs/keybindings/Keybindings_pl.md @@ -98,8 +98,8 @@ ## Main (Normal) <pre> - <kbd>PgDn</kbd>: scroll down - <kbd>PgUp</kbd>: scroll up + <kbd>PgDn</kbd>: scroll down (fn+up) + <kbd>PgUp</kbd>: scroll up (fn+down) </pre> ## Main (Zatwierdzanie) diff --git a/pkg/gui/keybindings.go b/pkg/gui/keybindings.go index 4c1bdd184..c205d3384 100644 --- a/pkg/gui/keybindings.go +++ b/pkg/gui/keybindings.go @@ -576,12 +576,14 @@ func (gui *Gui) GetContextMap() map[string]map[string][]*Binding { Modifier: gocui.ModNone, Handler: gui.scrollDownMain, Description: gui.Tr.SLocalize("ScrollDown"), + Alternative: "fn+up", }, { ViewName: "main", Key: gocui.MouseWheelUp, Modifier: gocui.ModNone, Handler: gui.scrollUpMain, Description: gui.Tr.SLocalize("ScrollUp"), + Alternative: "fn+down", }, }, "staging": { diff --git a/scripts/generate_cheatsheet.go b/scripts/generate_cheatsheet.go index 11a626414..f3d5e84db 100644 --- a/scripts/generate_cheatsheet.go +++ b/scripts/generate_cheatsheet.go @@ -99,7 +99,7 @@ func getBindingSections(mApp *app.App) []*bindingSection { } func addBinding(title string, bindingSections []*bindingSection, binding *gui.Binding) []*bindingSection { - if binding.Description == "" { + if binding.Description == "" && binding.Alternative == "" { return bindingSections } |