Add key name "bspace" for --bind (bspace != ctrl-h)
This commit is contained in:
parent
45bd323cab
commit
d54a4fa223
@ -51,6 +51,7 @@ const (
|
||||
Mouse
|
||||
|
||||
BTab
|
||||
BSpace
|
||||
|
||||
Del
|
||||
PgUp
|
||||
@ -483,7 +484,7 @@ func GetChar() Event {
|
||||
case CtrlQ:
|
||||
return Event{CtrlQ, 0, nil}
|
||||
case 127:
|
||||
return Event{CtrlH, 0, nil}
|
||||
return Event{BSpace, 0, nil}
|
||||
case ESC:
|
||||
return escSequence(&sz)
|
||||
}
|
||||
|
@ -293,6 +293,8 @@ func parseKeyChords(str string, message string, bind bool) []int {
|
||||
chord = curses.CtrlM
|
||||
case "space":
|
||||
chord = curses.AltZ + int(' ')
|
||||
case "bspace":
|
||||
chord = curses.BSpace
|
||||
case "tab":
|
||||
chord = curses.Tab
|
||||
case "btab":
|
||||
|
@ -137,6 +137,7 @@ func defaultKeymap() map[int]actionType {
|
||||
keymap[C.CtrlE] = actEndOfLine
|
||||
keymap[C.CtrlF] = actForwardChar
|
||||
keymap[C.CtrlH] = actBackwardDeleteChar
|
||||
keymap[C.BSpace] = actBackwardDeleteChar
|
||||
keymap[C.Tab] = actToggleDown
|
||||
keymap[C.BTab] = actToggleUp
|
||||
keymap[C.CtrlJ] = actDown
|
||||
|
Loading…
x
Reference in New Issue
Block a user