From 6b592137b966299a8a1324ccb1ddf3d6aaa7bbc9 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Fri, 28 Apr 2017 02:36:36 +0900 Subject: Add support for ctrl-alt-[a-z] key chords Close #906 --- src/options.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/options.go') 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' -- cgit v1.2.3