diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2017-04-28 02:36:36 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2017-04-28 02:36:36 +0900 |
| commit | 6b592137b966299a8a1324ccb1ddf3d6aaa7bbc9 (patch) | |
| tree | f93216eee9d31f48816e60269125d66dc74f2313 /src/options.go | |
| parent | d5e72bf55d0bb317a3b9515885e92d94097b38fe (diff) | |
| download | fzf-6b592137b966299a8a1324ccb1ddf3d6aaa7bbc9.tar.gz | |
Add support for ctrl-alt-[a-z] key chords
Close #906
Diffstat (limited to 'src/options.go')
| -rw-r--r-- | src/options.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/options.go b/src/options.go index 0c84a3a9..8dd58f08 100644 --- a/src/options.go +++ b/src/options.go @@ -401,7 +401,7 @@ func parseKeyChords(str string, message string) map[int]string { case "ctrl-space": chord = tui.CtrlSpace case "alt-enter", "alt-return": - chord = tui.AltEnter + chord = tui.CtrlAltM case "alt-space": chord = tui.AltSpace case "alt-/": @@ -437,7 +437,9 @@ func parseKeyChords(str string, message string) map[int]string { case "f12": chord = tui.F12 default: - if len(key) == 6 && strings.HasPrefix(lkey, "ctrl-") && isAlphabet(lkey[5]) { + if len(key) == 10 && strings.HasPrefix(lkey, "ctrl-alt-") && isAlphabet(lkey[9]) { + chord = tui.CtrlAltA + int(lkey[9]) - 'a' + } else if len(key) == 6 && strings.HasPrefix(lkey, "ctrl-") && isAlphabet(lkey[5]) { chord = tui.CtrlA + int(lkey[5]) - 'a' } else if len(key) == 5 && strings.HasPrefix(lkey, "alt-") && isAlphabet(lkey[4]) { chord = tui.AltA + int(lkey[4]) - 'a' |
