summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorSuhas Karanth <sudo.suhas@gmail.com>2019-05-03 10:33:25 +0530
committerJesse Duffield <jessedduffield@gmail.com>2019-05-12 16:20:42 +1000
commit97f060d38d5f1d1b33e5826e86a5bc043294e376 (patch)
tree8a240890bfa5c7698462450624b9b6ab91620e85 /scripts
parent357b8fa98fbb60639ca051081ebb82fc3fe58c19 (diff)
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`.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/generate_cheatsheet.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/generate_cheatsheet.go b/scripts/generate_cheatsheet.go
index 7741c783f..11a626414 100644
--- a/scripts/generate_cheatsheet.go
+++ b/scripts/generate_cheatsheet.go
@@ -59,6 +59,9 @@ func formatTitle(title string) string {
}
func formatBinding(binding *gui.Binding) string {
+ if binding.Alternative != "" {
+ return fmt.Sprintf(" <kbd>%s</kbd>: %s (%s)\n", binding.GetKey(), binding.Description, binding.Alternative)
+ }
return fmt.Sprintf(" <kbd>%s</kbd>: %s\n", binding.GetKey(), binding.Description)
}