@@ -130,22 +130,18 @@ class KeybindingsRegistryImpl implements IKeybindingsRegistry {
130130 const actualKb = KeybindingsRegistryImpl . bindToCurrentPlatform ( rule ) ;
131131
132132 if ( actualKb && actualKb . primary ) {
133- if ( ! this . _assertBrowserConflicts ( actualKb . primary , rule . id ) ) {
134- const kk = createKeybinding ( actualKb . primary , OS ) ;
135- if ( kk ) {
136- this . _registerDefaultKeybinding ( kk , rule . id , undefined , rule . weight , 0 , rule . when ) ;
137- }
133+ const kk = createKeybinding ( actualKb . primary , OS ) ;
134+ if ( kk ) {
135+ this . _registerDefaultKeybinding ( kk , rule . id , undefined , rule . weight , 0 , rule . when ) ;
138136 }
139137 }
140138
141139 if ( actualKb && Array . isArray ( actualKb . secondary ) ) {
142140 for ( let i = 0 , len = actualKb . secondary . length ; i < len ; i ++ ) {
143141 const k = actualKb . secondary [ i ] ;
144- if ( ! this . _assertBrowserConflicts ( k , rule . id ) ) {
145- const kk = createKeybinding ( k , OS ) ;
146- if ( kk ) {
147- this . _registerDefaultKeybinding ( kk , rule . id , undefined , rule . weight , - i - 1 , rule . when ) ;
148- }
142+ const kk = createKeybinding ( k , OS ) ;
143+ if ( kk ) {
144+ this . _registerDefaultKeybinding ( kk , rule . id , undefined , rule . weight , - i - 1 , rule . when ) ;
149145 }
150146 }
151147 }
@@ -212,54 +208,6 @@ class KeybindingsRegistryImpl implements IKeybindingsRegistry {
212208 }
213209 }
214210
215- private _assertBrowserConflicts ( keybinding : number , commandId : string ) : boolean {
216- if ( ! isWeb ) {
217- return false ;
218- }
219-
220- const firstPart = ( keybinding & 0x0000FFFF ) >>> 0 ;
221- const chordPart = ( keybinding & 0xFFFF0000 ) >>> 16 ;
222- const modifiersMask = KeyMod . CtrlCmd | KeyMod . Alt | KeyMod . Shift ;
223-
224- for ( let part of [ firstPart , chordPart ] ) {
225- if ( ( part & modifiersMask ) === 0 ) {
226- continue ;
227- }
228-
229- if ( ( part & modifiersMask ) === KeyMod . CtrlCmd && ( part & 0x000000FF ) === KeyCode . KEY_W ) {
230- console . warn ( 'Ctrl/Cmd+W keybindings should not be used by default in web. Offender: ' , keybinding , ' for ' , commandId ) ;
231-
232- return true ;
233- }
234-
235- if ( ( part & modifiersMask ) === KeyMod . CtrlCmd && ( part & 0x000000FF ) === KeyCode . KEY_N ) {
236- console . warn ( 'Ctrl/Cmd+N keybindings should not be used by default in web. Offender: ' , keybinding , ' for ' , commandId ) ;
237-
238- return true ;
239- }
240-
241- if ( ( part & modifiersMask ) === KeyMod . CtrlCmd && ( part & 0x000000FF ) === KeyCode . KEY_T ) {
242- console . warn ( 'Ctrl/Cmd+T keybindings should not be used by default in web. Offender: ' , keybinding , ' for ' , commandId ) ;
243-
244- return true ;
245- }
246-
247- if ( ( part & modifiersMask ) === ( KeyMod . CtrlCmd | KeyMod . Alt ) && ( ( part & 0x000000FF ) === KeyCode . LeftArrow || ( part & 0x000000FF ) === KeyCode . RightArrow ) ) {
248- console . warn ( 'Ctrl/Cmd+Arrow keybindings should not be used by default in web. Offender: ' , keybinding , ' for ' , commandId ) ;
249-
250- return true ;
251- }
252-
253- if ( ( part & modifiersMask ) === KeyMod . CtrlCmd && ( ( part & 0x000000FF ) >= KeyCode . KEY_0 && ( part & 0x000000FF ) <= KeyCode . KEY_9 ) ) {
254- console . warn ( 'Ctrl/Cmd+Num keybindings should not be used by default in web. Offender: ' , keybinding , ' for ' , commandId ) ;
255-
256- return true ;
257- }
258- }
259-
260- return false ;
261- }
262-
263211 private _registerDefaultKeybinding ( keybinding : Keybinding , commandId : string , commandArgs : any , weight1 : number , weight2 : number , when : ContextKeyExpr | null | undefined ) : void {
264212 if ( OS === OperatingSystem . Windows ) {
265213 this . _assertNoCtrlAlt ( keybinding . parts [ 0 ] , commandId ) ;
0 commit comments