mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-19 00:53:42 -05:00
Add keybindings for CTRL, ALT, SHIFT + UP, DOWN, RIGHT, LEFT, HOME, END, BACKSPACE, DELETE & more (#3996)
* Added tests for `LightRenderer`
* Added common SHIFT, ALT and ALT+SHIFT key sequences
* Added common CTRL key sequences
* Added common CTRL+ALT, CTRL+SHIFT, CTRL+ALT+SHIFT key sequences
* Added proper xterm META modifier handling
according to defc6dd568/input.c (L357-L375)
* Fix `ctrl-backspace` and `ctrl-alt-backspace`
* Fix broken tcell tests on windows by swallowing Resize events
* Added tests for FullscreenRenderer
* Removed own fork of tcell and updated tcell to 2.9.0
tcell 2.9.0 is needed for `Ctrl-Alt-*` and `Ctrl-Alt-Shift-*` shortcuts in Windows
* Replace conditional checks with switch statements to improve readability
* Replace long conditionals with constant slices to improve readability
* Bind `ctrl-bspace` (`ctrl-h`) to `backward-delete-char` by default
Since we now distinguish between Backspace and Ctrl-Backspace, Ctrl-Backspace should trigger the same action as Backspace by default. In that way nothing changes for the user but you can bind other actions to Ctrl-Backspace when desired.
This commit is contained in:
@@ -44,7 +44,6 @@ const (
|
||||
CtrlZ
|
||||
Esc
|
||||
CtrlSpace
|
||||
CtrlDelete
|
||||
|
||||
// https://apple.stackexchange.com/questions/24261/how-do-i-send-c-that-is-control-slash-to-the-terminal
|
||||
CtrlBackSlash
|
||||
@@ -72,6 +71,10 @@ const (
|
||||
ShiftLeft
|
||||
ShiftRight
|
||||
ShiftDelete
|
||||
ShiftHome
|
||||
ShiftEnd
|
||||
ShiftPageUp
|
||||
ShiftPageDown
|
||||
|
||||
F1
|
||||
F2
|
||||
@@ -92,15 +95,67 @@ const (
|
||||
AltDown
|
||||
AltLeft
|
||||
AltRight
|
||||
AltDelete
|
||||
AltHome
|
||||
AltEnd
|
||||
AltPageUp
|
||||
AltPageDown
|
||||
|
||||
AltShiftUp
|
||||
AltShiftDown
|
||||
AltShiftLeft
|
||||
AltShiftRight
|
||||
AltShiftDelete
|
||||
AltShiftHome
|
||||
AltShiftEnd
|
||||
AltShiftPageUp
|
||||
AltShiftPageDown
|
||||
|
||||
CtrlUp
|
||||
CtrlDown
|
||||
CtrlLeft
|
||||
CtrlRight
|
||||
CtrlHome
|
||||
CtrlEnd
|
||||
CtrlBackspace
|
||||
CtrlDelete
|
||||
CtrlPageUp
|
||||
CtrlPageDown
|
||||
|
||||
Alt
|
||||
CtrlAlt
|
||||
|
||||
CtrlAltUp
|
||||
CtrlAltDown
|
||||
CtrlAltLeft
|
||||
CtrlAltRight
|
||||
CtrlAltHome
|
||||
CtrlAltEnd
|
||||
CtrlAltBackspace
|
||||
CtrlAltDelete
|
||||
CtrlAltPageUp
|
||||
CtrlAltPageDown
|
||||
|
||||
CtrlShiftUp
|
||||
CtrlShiftDown
|
||||
CtrlShiftLeft
|
||||
CtrlShiftRight
|
||||
CtrlShiftHome
|
||||
CtrlShiftEnd
|
||||
CtrlShiftDelete
|
||||
CtrlShiftPageUp
|
||||
CtrlShiftPageDown
|
||||
|
||||
CtrlAltShiftUp
|
||||
CtrlAltShiftDown
|
||||
CtrlAltShiftLeft
|
||||
CtrlAltShiftRight
|
||||
CtrlAltShiftHome
|
||||
CtrlAltShiftEnd
|
||||
CtrlAltShiftDelete
|
||||
CtrlAltShiftPageUp
|
||||
CtrlAltShiftPageDown
|
||||
|
||||
Invalid
|
||||
Fatal
|
||||
BracketedPasteBegin
|
||||
|
||||
Reference in New Issue
Block a user