mirror of
https://github.com/junegunn/fzf.git
synced 2025-12-09 22:25:41 +08:00
Make ctrl-alt-h a synonym of ctrl-alt-backspace on non-Windows environment
This commit is contained in:
@@ -1217,7 +1217,11 @@ func parseKeyChords(str string, message string) (map[tui.Event]string, []tui.Eve
|
|||||||
default:
|
default:
|
||||||
runes := []rune(key)
|
runes := []rune(key)
|
||||||
if len(key) == 10 && strings.HasPrefix(lkey, "ctrl-alt-") && isAlphabet(lkey[9]) {
|
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
|
chords[evt] = key
|
||||||
list = append(list, evt)
|
list = append(list, evt)
|
||||||
} else if len(key) == 6 && strings.HasPrefix(lkey, "ctrl-") && isAlphabet(lkey[5]) {
|
} else if len(key) == 6 && strings.HasPrefix(lkey, "ctrl-") && isAlphabet(lkey[5]) {
|
||||||
|
|||||||
Reference in New Issue
Block a user