@@ -17,6 +17,7 @@ import { ContextKeyExpression } from '@opensumi/monaco-editor-core/esm/vs/platfo
1717import { IContextKeyService } from '../context-key' ;
1818import { KeyboardLayoutService } from '../keyboard/keyboard-layout-service' ;
1919import { Key , KeyCode , KeySequence , SpecialCases } from '../keyboard/keys' ;
20+ import { AppConfig } from '../react-providers/config-provider' ;
2021import { IStatusBarService , StatusBarAlignment } from '../services' ;
2122
2223export enum KeybindingScope {
@@ -230,6 +231,9 @@ export class KeybindingRegistryImpl implements KeybindingRegistry, KeybindingSer
230231 @Autowired ( IStatusBarService )
231232 protected readonly statusBar : IStatusBarService ;
232233
234+ @Autowired ( AppConfig )
235+ private readonly appConfig : AppConfig ;
236+
233237 public async initialize ( ) : Promise < void > {
234238 await this . keyboardLayoutService . initialize ( ) ;
235239 this . keyboardLayoutService . onKeyboardLayoutChanged ( ( ) => {
@@ -884,6 +888,10 @@ export class KeybindingRegistryImpl implements KeybindingRegistry, KeybindingSer
884888 return false ;
885889 }
886890 for ( const binding of bindings ) {
891+ // 在web下electron绑定的浏览器基础快捷键无法使用,这里跳过,直接使用浏览器的快捷键
892+ if ( ! this . appConfig . isElectronRenderer && binding . command . startsWith ( 'electron.' ) ) {
893+ continue ;
894+ }
887895 if ( this . isEnabled ( binding , event ) ) {
888896 if ( this . isPseudoCommand ( binding . command ) ) {
889897 // 让事件冒泡
0 commit comments