summaryrefslogtreecommitdiff
path: root/src/options.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2016-05-18 22:25:09 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2016-05-18 22:25:09 +0900
commitc62fc5e75c09262a384e703800fefa6850afa2e8 (patch)
tree3581185044fc958efec239e98b5873cee5da5378 /src/options.go
parent70245ad98cb3fa8d2c13b882e615317488ccbdc0 (diff)
downloadfzf-c62fc5e75c09262a384e703800fefa6850afa2e8.tar.gz
More named keys: F5 ~ F10, ALT-/
Diffstat (limited to 'src/options.go')
-rw-r--r--src/options.go6
1 files changed, 5 insertions, 1 deletions
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])