@@ -63,30 +63,30 @@ type KeyMap struct {
63
63
// DefaultKeyMap is the default set of key bindings for navigating and acting
64
64
// upon the textarea.
65
65
var DefaultKeyMap = KeyMap {
66
- CharacterForward : key .NewBinding (key .WithKeys ("right" , "ctrl+f" )),
67
- CharacterBackward : key .NewBinding (key .WithKeys ("left" , "ctrl+b" )),
68
- WordForward : key .NewBinding (key .WithKeys ("alt+right" , "alt+f" )),
69
- WordBackward : key .NewBinding (key .WithKeys ("alt+left" , "alt+b" )),
70
- LineNext : key .NewBinding (key .WithKeys ("down" , "ctrl+n" )),
71
- LinePrevious : key .NewBinding (key .WithKeys ("up" , "ctrl+p" )),
72
- DeleteWordBackward : key .NewBinding (key .WithKeys ("alt+backspace" , "ctrl+w" )),
73
- DeleteWordForward : key .NewBinding (key .WithKeys ("alt+delete" , "alt+d" )),
74
- DeleteAfterCursor : key .NewBinding (key .WithKeys ("ctrl+k" )),
75
- DeleteBeforeCursor : key .NewBinding (key .WithKeys ("ctrl+u" )),
76
- InsertNewline : key .NewBinding (key .WithKeys ("enter" , "ctrl+m" )),
77
- DeleteCharacterBackward : key .NewBinding (key .WithKeys ("backspace" , "ctrl+h" )),
78
- DeleteCharacterForward : key .NewBinding (key .WithKeys ("delete" , "ctrl+d" )),
79
- LineStart : key .NewBinding (key .WithKeys ("home" , "ctrl+a" )),
80
- LineEnd : key .NewBinding (key .WithKeys ("end" , "ctrl+e" )),
81
- Paste : key .NewBinding (key .WithKeys ("ctrl+v" )),
82
- InputBegin : key .NewBinding (key .WithKeys ("alt+<" , "ctrl+home" )),
83
- InputEnd : key .NewBinding (key .WithKeys ("alt+>" , "ctrl+end" )),
84
-
85
- CapitalizeWordForward : key .NewBinding (key .WithKeys ("alt+c" )),
86
- LowercaseWordForward : key .NewBinding (key .WithKeys ("alt+l" )),
87
- UppercaseWordForward : key .NewBinding (key .WithKeys ("alt+u" )),
88
-
89
- TransposeCharacterBackward : key .NewBinding (key .WithKeys ("ctrl+t" )),
66
+ CharacterForward : key .NewBinding (key .WithKeys ("right" , "ctrl+f" ), key . WithHelp ( "right" , "character forward" ) ),
67
+ CharacterBackward : key .NewBinding (key .WithKeys ("left" , "ctrl+b" ), key . WithHelp ( "left" , "character backward" ) ),
68
+ WordForward : key .NewBinding (key .WithKeys ("alt+right" , "alt+f" ), key . WithHelp ( "alt+right" , "word forward" ) ),
69
+ WordBackward : key .NewBinding (key .WithKeys ("alt+left" , "alt+b" ), key . WithHelp ( "alt+left" , "word backward" ) ),
70
+ LineNext : key .NewBinding (key .WithKeys ("down" , "ctrl+n" ), key . WithHelp ( "down" , "next line" ) ),
71
+ LinePrevious : key .NewBinding (key .WithKeys ("up" , "ctrl+p" ), key . WithHelp ( "up" , "previous line" ) ),
72
+ DeleteWordBackward : key .NewBinding (key .WithKeys ("alt+backspace" , "ctrl+w" ), key . WithHelp ( "alt+backspace" , "delete word backward" ) ),
73
+ DeleteWordForward : key .NewBinding (key .WithKeys ("alt+delete" , "alt+d" ), key . WithHelp ( "alt+delete" , "delete word forward" ) ),
74
+ DeleteAfterCursor : key .NewBinding (key .WithKeys ("ctrl+k" ), key . WithHelp ( "ctrl+k" , "delete after cursor" ) ),
75
+ DeleteBeforeCursor : key .NewBinding (key .WithKeys ("ctrl+u" ), key . WithHelp ( "ctrl+u" , "delete before cursor" ) ),
76
+ InsertNewline : key .NewBinding (key .WithKeys ("enter" , "ctrl+m" ), key . WithHelp ( "enter" , "insert newline" ) ),
77
+ DeleteCharacterBackward : key .NewBinding (key .WithKeys ("backspace" , "ctrl+h" ), key . WithHelp ( "backspace" , "delete character backward" ) ),
78
+ DeleteCharacterForward : key .NewBinding (key .WithKeys ("delete" , "ctrl+d" ), key . WithHelp ( "delete" , "delete character forward" ) ),
79
+ LineStart : key .NewBinding (key .WithKeys ("home" , "ctrl+a" ), key . WithHelp ( "home" , "line start" ) ),
80
+ LineEnd : key .NewBinding (key .WithKeys ("end" , "ctrl+e" ), key . WithHelp ( "end" , "line end" ) ),
81
+ Paste : key .NewBinding (key .WithKeys ("ctrl+v" ), key . WithHelp ( "ctrl+v" , "paste" ) ),
82
+ InputBegin : key .NewBinding (key .WithKeys ("alt+<" , "ctrl+home" ), key . WithHelp ( "alt+<" , "input begin" ) ),
83
+ InputEnd : key .NewBinding (key .WithKeys ("alt+>" , "ctrl+end" ), key . WithHelp ( "alt+>" , "input end" ) ),
84
+
85
+ CapitalizeWordForward : key .NewBinding (key .WithKeys ("alt+c" ), key . WithHelp ( "alt+c" , "capitalize word forward" ) ),
86
+ LowercaseWordForward : key .NewBinding (key .WithKeys ("alt+l" ), key . WithHelp ( "alt+l" , "lowercase word forward" ) ),
87
+ UppercaseWordForward : key .NewBinding (key .WithKeys ("alt+u" ), key . WithHelp ( "alt+u" , "uppercase word forward" ) ),
88
+
89
+ TransposeCharacterBackward : key .NewBinding (key .WithKeys ("ctrl+t" ), key . WithHelp ( "ctrl+t" , "transpose character backward" ) ),
90
90
}
91
91
92
92
// LineInfo is a helper for keeping track of line information regarding
0 commit comments