Make ctrl-alt-h a synonym of ctrl-alt-backspace on non-Windows environment

This commit is contained in:
Junegunn Choi
2025-11-15 10:43:33 +09:00
parent 3f499f055e
commit 72f73ee56d

View File

@@ -1217,7 +1217,11 @@ func parseKeyChords(str string, message string) (map[tui.Event]string, []tui.Eve
default:
runes := []rune(key)
if len(key) == 10 && strings.HasPrefix(lkey, "ctrl-alt-") && isAlphabet(lkey[9]) {
evt := tui.CtrlAltKey(rune(key[9]))
r := rune(key[9])
evt := tui.CtrlAltKey(r)
if r == 'h' && !util.IsWindows() {
evt = tui.CtrlAltBackspace.AsEvent()
}
chords[evt] = key
list = append(list, evt)
} else if len(key) == 6 && strings.HasPrefix(lkey, "ctrl-") && isAlphabet(lkey[5]) {