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:
Suhas Karanth 2019-05-03 10:33:25 +05:30 committed by Jesse Duffield
parent 357b8fa98f
commit 97f060d38d
5 changed files with 50 additions and 32 deletions

View file

@ -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)
}