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