@@ -134,27 +134,12 @@ export const defaultKeyBindings: KeyBindingConfig = {
134134 [ Command . EXIT ] : [ { key : 'd' , ctrl : true } ] ,
135135
136136 // Cursor Movement
137- [ Command . HOME ] : [
138- { key : 'a' , ctrl : true } ,
139- { key : 'home' , shift : false , ctrl : false } ,
140- ] ,
141- [ Command . END ] : [
142- { key : 'e' , ctrl : true } ,
143- { key : 'end' , shift : false , ctrl : false } ,
144- ] ,
145- [ Command . MOVE_UP ] : [
146- { key : 'up' , shift : false , alt : false , ctrl : false , cmd : false } ,
147- ] ,
148- [ Command . MOVE_DOWN ] : [
149- { key : 'down' , shift : false , alt : false , ctrl : false , cmd : false } ,
150- ] ,
151- [ Command . MOVE_LEFT ] : [
152- { key : 'left' , shift : false , alt : false , ctrl : false , cmd : false } ,
153- ] ,
154- [ Command . MOVE_RIGHT ] : [
155- { key : 'right' , shift : false , alt : false , ctrl : false , cmd : false } ,
156- { key : 'f' , ctrl : true } ,
157- ] ,
137+ [ Command . HOME ] : [ { key : 'a' , ctrl : true } , { key : 'home' } ] ,
138+ [ Command . END ] : [ { key : 'e' , ctrl : true } , { key : 'end' } ] ,
139+ [ Command . MOVE_UP ] : [ { key : 'up' } ] ,
140+ [ Command . MOVE_DOWN ] : [ { key : 'down' } ] ,
141+ [ Command . MOVE_LEFT ] : [ { key : 'left' } ] ,
142+ [ Command . MOVE_RIGHT ] : [ { key : 'right' } , { key : 'f' , ctrl : true } ] ,
158143 [ Command . MOVE_WORD_LEFT ] : [
159144 { key : 'left' , ctrl : true } ,
160145 { key : 'left' , alt : true } ,
@@ -183,8 +168,8 @@ export const defaultKeyBindings: KeyBindingConfig = {
183168 [ Command . DELETE_CHAR_LEFT ] : [ { key : 'backspace' } , { key : 'h' , ctrl : true } ] ,
184169 [ Command . DELETE_CHAR_RIGHT ] : [ { key : 'delete' } , { key : 'd' , ctrl : true } ] ,
185170 [ Command . UNDO ] : [
186- { key : 'z' , cmd : true , shift : false } ,
187- { key : 'z' , alt : true , shift : false } ,
171+ { key : 'z' , cmd : true } ,
172+ { key : 'z' , alt : true } ,
188173 ] ,
189174 [ Command . REDO ] : [
190175 { key : 'z' , ctrl : true , shift : true } ,
@@ -207,56 +192,33 @@ export const defaultKeyBindings: KeyBindingConfig = {
207192 [ Command . PAGE_DOWN ] : [ { key : 'pagedown' } ] ,
208193
209194 // History & Search
210- [ Command . HISTORY_UP ] : [ { key : 'p' , shift : false , ctrl : true } ] ,
211- [ Command . HISTORY_DOWN ] : [ { key : 'n' , shift : false , ctrl : true } ] ,
195+ [ Command . HISTORY_UP ] : [ { key : 'p' , ctrl : true } ] ,
196+ [ Command . HISTORY_DOWN ] : [ { key : 'n' , ctrl : true } ] ,
212197 [ Command . REVERSE_SEARCH ] : [ { key : 'r' , ctrl : true } ] ,
213- [ Command . REWIND ] : [ { key : 'double escape' } ] ,
214- [ Command . SUBMIT_REVERSE_SEARCH ] : [ { key : 'return' , ctrl : false } ] ,
215- [ Command . ACCEPT_SUGGESTION_REVERSE_SEARCH ] : [ { key : 'tab' , shift : false } ] ,
198+ [ Command . REWIND ] : [ { key : 'double escape' } ] , // for documentation only
199+ [ Command . SUBMIT_REVERSE_SEARCH ] : [ { key : 'return' } ] ,
200+ [ Command . ACCEPT_SUGGESTION_REVERSE_SEARCH ] : [ { key : 'tab' } ] ,
216201
217202 // Navigation
218- [ Command . NAVIGATION_UP ] : [ { key : 'up' , shift : false } ] ,
219- [ Command . NAVIGATION_DOWN ] : [ { key : 'down' , shift : false } ] ,
203+ [ Command . NAVIGATION_UP ] : [ { key : 'up' } ] ,
204+ [ Command . NAVIGATION_DOWN ] : [ { key : 'down' } ] ,
220205 // Navigation shortcuts appropriate for dialogs where we do not need to accept
221206 // text input.
222- [ Command . DIALOG_NAVIGATION_UP ] : [
223- { key : 'up' , shift : false } ,
224- { key : 'k' , shift : false } ,
225- ] ,
226- [ Command . DIALOG_NAVIGATION_DOWN ] : [
227- { key : 'down' , shift : false } ,
228- { key : 'j' , shift : false } ,
229- ] ,
230- [ Command . DIALOG_NEXT ] : [ { key : 'tab' , shift : false } ] ,
207+ [ Command . DIALOG_NAVIGATION_UP ] : [ { key : 'up' } , { key : 'k' } ] ,
208+ [ Command . DIALOG_NAVIGATION_DOWN ] : [ { key : 'down' } , { key : 'j' } ] ,
209+ [ Command . DIALOG_NEXT ] : [ { key : 'tab' } ] ,
231210 [ Command . DIALOG_PREV ] : [ { key : 'tab' , shift : true } ] ,
232211
233212 // Suggestions & Completions
234- [ Command . ACCEPT_SUGGESTION ] : [
235- { key : 'tab' , shift : false } ,
236- { key : 'return' , ctrl : false } ,
237- ] ,
238- [ Command . COMPLETION_UP ] : [
239- { key : 'up' , shift : false } ,
240- { key : 'p' , shift : false , ctrl : true } ,
241- ] ,
242- [ Command . COMPLETION_DOWN ] : [
243- { key : 'down' , shift : false } ,
244- { key : 'n' , shift : false , ctrl : true } ,
245- ] ,
213+ [ Command . ACCEPT_SUGGESTION ] : [ { key : 'tab' } , { key : 'return' } ] ,
214+ [ Command . COMPLETION_UP ] : [ { key : 'up' } , { key : 'p' , ctrl : true } ] ,
215+ [ Command . COMPLETION_DOWN ] : [ { key : 'down' } , { key : 'n' , ctrl : true } ] ,
246216 [ Command . EXPAND_SUGGESTION ] : [ { key : 'right' } ] ,
247217 [ Command . COLLAPSE_SUGGESTION ] : [ { key : 'left' } ] ,
248218
249219 // Text Input
250220 // Must also exclude shift to allow shift+enter for newline
251- [ Command . SUBMIT ] : [
252- {
253- key : 'return' ,
254- shift : false ,
255- alt : false ,
256- ctrl : false ,
257- cmd : false ,
258- } ,
259- ] ,
221+ [ Command . SUBMIT ] : [ { key : 'return' } ] ,
260222 [ Command . NEWLINE ] : [
261223 { key : 'return' , ctrl : true } ,
262224 { key : 'return' , cmd : true } ,
@@ -283,19 +245,17 @@ export const defaultKeyBindings: KeyBindingConfig = {
283245 [ Command . TOGGLE_BACKGROUND_SHELL_LIST ] : [ { key : 'l' , ctrl : true } ] ,
284246 [ Command . KILL_BACKGROUND_SHELL ] : [ { key : 'k' , ctrl : true } ] ,
285247 [ Command . UNFOCUS_BACKGROUND_SHELL ] : [ { key : 'tab' , shift : true } ] ,
286- [ Command . UNFOCUS_BACKGROUND_SHELL_LIST ] : [ { key : 'tab' , shift : false } ] ,
287- [ Command . SHOW_BACKGROUND_SHELL_UNFOCUS_WARNING ] : [
288- { key : 'tab' , shift : false } ,
289- ] ,
290- [ Command . SHOW_SHELL_INPUT_UNFOCUS_WARNING ] : [ { key : 'tab' , shift : false } ] ,
248+ [ Command . UNFOCUS_BACKGROUND_SHELL_LIST ] : [ { key : 'tab' } ] ,
249+ [ Command . SHOW_BACKGROUND_SHELL_UNFOCUS_WARNING ] : [ { key : 'tab' } ] ,
250+ [ Command . SHOW_SHELL_INPUT_UNFOCUS_WARNING ] : [ { key : 'tab' } ] ,
291251 [ Command . BACKGROUND_SHELL_SELECT ] : [ { key : 'return' } ] ,
292252 [ Command . BACKGROUND_SHELL_ESCAPE ] : [ { key : 'escape' } ] ,
293253 [ Command . SHOW_MORE_LINES ] : [ { key : 'o' , ctrl : true } ] ,
294254 [ Command . EXPAND_PASTE ] : [ { key : 'o' , ctrl : true } ] ,
295- [ Command . FOCUS_SHELL_INPUT ] : [ { key : 'tab' , shift : false } ] ,
255+ [ Command . FOCUS_SHELL_INPUT ] : [ { key : 'tab' } ] ,
296256 [ Command . UNFOCUS_SHELL_INPUT ] : [ { key : 'tab' , shift : true } ] ,
297257 [ Command . CLEAR_SCREEN ] : [ { key : 'l' , ctrl : true } ] ,
298- [ Command . RESTART_APP ] : [ { key : 'r' } ] ,
258+ [ Command . RESTART_APP ] : [ { key : 'r' } , { key : 'r' , shift : true } ] ,
299259 [ Command . SUSPEND_APP ] : [ { key : 'z' , ctrl : true } ] ,
300260} ;
301261
0 commit comments