From c62fc5e75c09262a384e703800fefa6850afa2e8 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Wed, 18 May 2016 22:25:09 +0900 Subject: More named keys: F5 ~ F10, ALT-/ --- src/options.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/options.go') diff --git a/src/options.go b/src/options.go index 089b4c2f..10a22287 100644 --- a/src/options.go +++ b/src/options.go @@ -322,6 +322,8 @@ func parseKeyChords(str string, message string) map[int]string { chord = curses.AltEnter case "alt-space": chord = curses.AltSpace + case "alt-/": + chord = curses.AltSlash case "alt-bs", "alt-bspace": chord = curses.AltBS case "tab": @@ -346,12 +348,14 @@ func parseKeyChords(str string, message string) map[int]string { chord = curses.SRight case "double-click": chord = curses.DoubleClick + case "f10": + chord = curses.F10 default: if len(key) == 6 && strings.HasPrefix(lkey, "ctrl-") && isAlphabet(lkey[5]) { chord = curses.CtrlA + int(lkey[5]) - 'a' } else if len(key) == 5 && strings.HasPrefix(lkey, "alt-") && isAlphabet(lkey[4]) { chord = curses.AltA + int(lkey[4]) - 'a' - } else if len(key) == 2 && strings.HasPrefix(lkey, "f") && key[1] >= '1' && key[1] <= '4' { + } else if len(key) == 2 && strings.HasPrefix(lkey, "f") && key[1] >= '1' && key[1] <= '9' { chord = curses.F1 + int(key[1]) - '1' } else if utf8.RuneCountInString(key) == 1 { chord = curses.AltZ + int([]rune(key)[0]) -- cgit v1.2.3