@@ -31,6 +31,10 @@ export enum Command {
3131 NAVIGATION_UP = 'navigationUp' ,
3232 NAVIGATION_DOWN = 'navigationDown' ,
3333
34+ // Dialog navigation
35+ DIALOG_NAVIGATION_UP = 'dialogNavigationUp' ,
36+ DIALOG_NAVIGATION_DOWN = 'dialogNavigationDown' ,
37+
3438 // Auto-completion
3539 ACCEPT_SUGGESTION = 'acceptSuggestion' ,
3640 COMPLETION_UP = 'completionUp' ,
@@ -100,8 +104,8 @@ export const defaultKeyBindings: KeyBindingConfig = {
100104 [ Command . ESCAPE ] : [ { key : 'escape' } ] ,
101105
102106 // Cursor movement
103- [ Command . HOME ] : [ { key : 'a' , ctrl : true } ] ,
104- [ Command . END ] : [ { key : 'e' , ctrl : true } ] ,
107+ [ Command . HOME ] : [ { key : 'a' , ctrl : true } , { key : 'home' } ] ,
108+ [ Command . END ] : [ { key : 'e' , ctrl : true } , { key : 'end' } ] ,
105109
106110 // Text deletion
107111 [ Command . KILL_LINE_RIGHT ] : [ { key : 'k' , ctrl : true } ] ,
@@ -118,15 +122,33 @@ export const defaultKeyBindings: KeyBindingConfig = {
118122
119123 // History navigation
120124 [ Command . HISTORY_UP ] : [ { key : 'p' , ctrl : true , shift : false } ] ,
121- [ Command . HISTORY_DOWN ] : [ { key : 'n' , ctrl : true } ] ,
122- [ Command . NAVIGATION_UP ] : [ { key : 'up' } ] ,
123- [ Command . NAVIGATION_DOWN ] : [ { key : 'down' } ] ,
125+ [ Command . HISTORY_DOWN ] : [ { key : 'n' , ctrl : true , shift : false } ] ,
126+ [ Command . NAVIGATION_UP ] : [ { key : 'up' , shift : false } ] ,
127+ [ Command . NAVIGATION_DOWN ] : [ { key : 'down' , shift : false } ] ,
128+
129+ // Dialog navigation
130+ // Navigation shortcuts appropriate for dialogs where we do not need to accept
131+ // text input.
132+ [ Command . DIALOG_NAVIGATION_UP ] : [
133+ { key : 'up' , shift : false } ,
134+ { key : 'k' , shift : false } ,
135+ ] ,
136+ [ Command . DIALOG_NAVIGATION_DOWN ] : [
137+ { key : 'down' , shift : false } ,
138+ { key : 'j' , shift : false } ,
139+ ] ,
124140
125141 // Auto-completion
126142 [ Command . ACCEPT_SUGGESTION ] : [ { key : 'tab' } , { key : 'return' , ctrl : false } ] ,
127143 // Completion navigation (arrow or Ctrl+P/N)
128- [ Command . COMPLETION_UP ] : [ { key : 'up' } , { key : 'p' , ctrl : true } ] ,
129- [ Command . COMPLETION_DOWN ] : [ { key : 'down' } , { key : 'n' , ctrl : true } ] ,
144+ [ Command . COMPLETION_UP ] : [
145+ { key : 'up' , shift : false } ,
146+ { key : 'p' , ctrl : true , shift : false } ,
147+ ] ,
148+ [ Command . COMPLETION_DOWN ] : [
149+ { key : 'down' , shift : false } ,
150+ { key : 'n' , ctrl : true , shift : false } ,
151+ ] ,
130152
131153 // Text input
132154 // Must also exclude shift to allow shift+enter for newline
0 commit comments