@@ -102,6 +102,40 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
102
102
}
103
103
} ) ;
104
104
105
+ KeybindingsRegistry . registerCommandAndKeybindingRule ( {
106
+ id : 'list.focusAnyDown' ,
107
+ weight : KeybindingWeight . WorkbenchContrib ,
108
+ when : WorkbenchListFocusContextKey ,
109
+ primary : KeyMod . Alt | KeyCode . DownArrow ,
110
+ mac : {
111
+ primary : KeyMod . Alt | KeyCode . DownArrow ,
112
+ secondary : [ KeyMod . WinCtrl | KeyMod . Alt | KeyCode . KeyN ]
113
+ } ,
114
+ handler : ( accessor , arg2 ) => {
115
+ navigate ( accessor . get ( IListService ) . lastFocusedList , async widget => {
116
+ const fakeKeyboardEvent = new KeyboardEvent ( 'keydown' , { altKey : true } ) ;
117
+ await widget . focusNext ( typeof arg2 === 'number' ? arg2 : 1 , false , fakeKeyboardEvent ) ;
118
+ } ) ;
119
+ }
120
+ } ) ;
121
+
122
+ KeybindingsRegistry . registerCommandAndKeybindingRule ( {
123
+ id : 'list.focusAnyUp' ,
124
+ weight : KeybindingWeight . WorkbenchContrib ,
125
+ when : WorkbenchListFocusContextKey ,
126
+ primary : KeyMod . Alt | KeyCode . UpArrow ,
127
+ mac : {
128
+ primary : KeyMod . Alt | KeyCode . UpArrow ,
129
+ secondary : [ KeyMod . WinCtrl | KeyMod . Alt | KeyCode . KeyP ]
130
+ } ,
131
+ handler : ( accessor , arg2 ) => {
132
+ navigate ( accessor . get ( IListService ) . lastFocusedList , async widget => {
133
+ const fakeKeyboardEvent = new KeyboardEvent ( 'keydown' , { altKey : true } ) ;
134
+ await widget . focusPrevious ( typeof arg2 === 'number' ? arg2 : 1 , false , fakeKeyboardEvent ) ;
135
+ } ) ;
136
+ }
137
+ } ) ;
138
+
105
139
KeybindingsRegistry . registerCommandAndKeybindingRule ( {
106
140
id : 'list.focusPageDown' ,
107
141
weight : KeybindingWeight . WorkbenchContrib ,
@@ -154,6 +188,32 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
154
188
}
155
189
} ) ;
156
190
191
+ KeybindingsRegistry . registerCommandAndKeybindingRule ( {
192
+ id : 'list.focusAnyFirst' ,
193
+ weight : KeybindingWeight . WorkbenchContrib ,
194
+ when : WorkbenchListFocusContextKey ,
195
+ primary : KeyMod . Alt | KeyCode . Home ,
196
+ handler : ( accessor ) => {
197
+ navigate ( accessor . get ( IListService ) . lastFocusedList , async widget => {
198
+ const fakeKeyboardEvent = new KeyboardEvent ( 'keydown' , { altKey : true } ) ;
199
+ await widget . focusFirst ( fakeKeyboardEvent ) ;
200
+ } ) ;
201
+ }
202
+ } ) ;
203
+
204
+ KeybindingsRegistry . registerCommandAndKeybindingRule ( {
205
+ id : 'list.focusAnyLast' ,
206
+ weight : KeybindingWeight . WorkbenchContrib ,
207
+ when : WorkbenchListFocusContextKey ,
208
+ primary : KeyMod . Alt | KeyCode . End ,
209
+ handler : ( accessor ) => {
210
+ navigate ( accessor . get ( IListService ) . lastFocusedList , async widget => {
211
+ const fakeKeyboardEvent = new KeyboardEvent ( 'keydown' , { altKey : true } ) ;
212
+ await widget . focusLast ( fakeKeyboardEvent ) ;
213
+ } ) ;
214
+ }
215
+ } ) ;
216
+
157
217
function expandMultiSelection ( focused : WorkbenchListWidget , previousFocus : unknown ) : void {
158
218
159
219
// List
0 commit comments