@codingame/monaco-vscode-keybindings-service-override 16.0.6 → 16.1.0-shadow-root.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -31,6 +31,7 @@ import './vscode/src/vs/workbench/contrib/keybindings/browser/keybindings.contri
31
31
  import './vscode/src/vs/workbench/contrib/preferences/browser/keybindingsEditorContribution.js';
32
32
  import './vscode/src/vs/workbench/contrib/commands/common/commands.contribution.js';
33
33
  import { getService } from '@codingame/monaco-vscode-api/services';
34
+ import { ILayoutService } from '@codingame/monaco-vscode-api/vscode/vs/platform/layout/browser/layoutService.service';
34
35
 
35
36
  const defaultUserKeybindindsFile = URI.from({
36
37
  scheme: Schemas.vscodeUserData,
@@ -45,8 +46,8 @@ async function updateUserKeybindings(keybindingsJson) {
45
46
  await fileService.writeFile(userDataProfilesService.defaultProfile.keybindingsResource, VSBuffer.fromString(keybindingsJson));
46
47
  }
47
48
  let DynamicWorkbenchKeybindingService = class DynamicWorkbenchKeybindingService extends WorkbenchKeybindingService {
48
- constructor(shouldUseGlobalKeybindings, contextKeyService, commandService, telemetryService, notificationService, userDataProfileService, hostService, extensionService, fileService, uriIdentityService, logService, keyboardLayoutService) {
49
- super(contextKeyService, commandService, telemetryService, notificationService, userDataProfileService, hostService, extensionService, fileService, uriIdentityService, logService, keyboardLayoutService);
49
+ constructor(shouldUseGlobalKeybindings, contextKeyService, commandService, telemetryService, notificationService, userDataProfileService, hostService, extensionService, fileService, uriIdentityService, logService, keyboardLayoutService, layoutService) {
50
+ super(contextKeyService, commandService, telemetryService, notificationService, userDataProfileService, hostService, extensionService, fileService, uriIdentityService, logService, keyboardLayoutService, layoutService);
50
51
  this.shouldUseGlobalKeybindings = shouldUseGlobalKeybindings;
51
52
  this.keybindingProviders = [];
52
53
  }
@@ -93,7 +94,8 @@ DynamicWorkbenchKeybindingService = __decorate([
93
94
  __param(8, IFileService),
94
95
  __param(9, IUriIdentityService),
95
96
  __param(10, ILogService),
96
- __param(11, IKeyboardLayoutService)
97
+ __param(11, IKeyboardLayoutService),
98
+ __param(12, ILayoutService)
97
99
  ], DynamicWorkbenchKeybindingService);
98
100
  onRenderWorkbench((accessor) => {
99
101
  accessor.get(IInstantiationService).createInstance(WorkbenchContextKeysHandler);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-keybindings-service-override",
3
- "version": "16.0.6",
3
+ "version": "16.1.0-shadow-root.1",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor - keybindings service-override",
6
6
  "keywords": [],
@@ -15,14 +15,15 @@
15
15
  },
16
16
  "type": "module",
17
17
  "dependencies": {
18
- "@codingame/monaco-vscode-2a22c7b4-b906-5914-8cd1-3ed912fb738f-common": "16.0.6",
19
- "@codingame/monaco-vscode-2b1a9082-790f-527f-b013-d1b29d6265a3-common": "16.0.6",
20
- "@codingame/monaco-vscode-40cada32-7e9c-528a-81fc-766e4da54147-common": "16.0.6",
21
- "@codingame/monaco-vscode-7559b0be-bfa5-5fe6-b731-1973fe9fffa1-common": "16.0.6",
22
- "@codingame/monaco-vscode-api": "16.0.6",
23
- "@codingame/monaco-vscode-b1110435-a331-5549-ab1e-aa3d763c3a1f-common": "16.0.6",
24
- "@codingame/monaco-vscode-d609a7d3-bf87-551a-884f-550a8b327ec5-common": "16.0.6",
25
- "@codingame/monaco-vscode-files-service-override": "16.0.6"
18
+ "@codingame/monaco-vscode-2a22c7b4-b906-5914-8cd1-3ed912fb738f-common": "16.1.0-shadow-root.1",
19
+ "@codingame/monaco-vscode-2b1a9082-790f-527f-b013-d1b29d6265a3-common": "16.1.0-shadow-root.1",
20
+ "@codingame/monaco-vscode-40cada32-7e9c-528a-81fc-766e4da54147-common": "16.1.0-shadow-root.1",
21
+ "@codingame/monaco-vscode-4893679b-56e5-52c5-a8fb-c366cce9660f-common": "16.1.0-shadow-root.1",
22
+ "@codingame/monaco-vscode-7559b0be-bfa5-5fe6-b731-1973fe9fffa1-common": "16.1.0-shadow-root.1",
23
+ "@codingame/monaco-vscode-a3eaa464-944c-5b8f-8886-213068ba4897-common": "16.1.0-shadow-root.1",
24
+ "@codingame/monaco-vscode-api": "16.1.0-shadow-root.1",
25
+ "@codingame/monaco-vscode-d609a7d3-bf87-551a-884f-550a8b327ec5-common": "16.1.0-shadow-root.1",
26
+ "@codingame/monaco-vscode-files-service-override": "16.1.0-shadow-root.1"
26
27
  },
27
28
  "main": "index.js",
28
29
  "module": "index.js",
@@ -13,7 +13,7 @@ import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/pl
13
13
  import { IWorkbenchEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service';
14
14
  import { WorkbenchState, isTemporaryWorkspace } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace';
15
15
  import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
16
- import { positionToString, Parts } from '@codingame/monaco-vscode-b1110435-a331-5549-ab1e-aa3d763c3a1f-common/vscode/vs/workbench/services/layout/browser/layoutService';
16
+ import { positionToString, Parts } from '@codingame/monaco-vscode-4893679b-56e5-52c5-a8fb-c366cce9660f-common/vscode/vs/workbench/services/layout/browser/layoutService';
17
17
  import { IWorkbenchLayoutService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/layout/browser/layoutService.service';
18
18
  import { getRemoteName } from '@codingame/monaco-vscode-api/vscode/vs/platform/remote/common/remoteHosts';
19
19
  import { getVirtualWorkspaceScheme } from '@codingame/monaco-vscode-7559b0be-bfa5-5fe6-b731-1973fe9fffa1-common/vscode/vs/platform/workspace/common/virtualWorkspace';
@@ -10,7 +10,7 @@ import { Range } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core
10
10
  import { registerEditorContribution, EditorContributionInstantiation } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorExtensions';
11
11
  import { SnippetController2 } from '@codingame/monaco-vscode-api/vscode/vs/editor/contrib/snippet/browser/snippetController2';
12
12
  import { SmartSnippetInserter } from '../common/smartSnippetInserter.js';
13
- import { DefineKeybindingOverlayWidget } from '@codingame/monaco-vscode-d609a7d3-bf87-551a-884f-550a8b327ec5-common/vscode/vs/workbench/contrib/preferences/browser/keybindingWidgets';
13
+ import { DefineKeybindingOverlayWidget } from '@codingame/monaco-vscode-a3eaa464-944c-5b8f-8886-213068ba4897-common/vscode/vs/workbench/contrib/preferences/browser/keybindingWidgets';
14
14
  import { parseTree } from '@codingame/monaco-vscode-api/vscode/vs/base/common/json';
15
15
  import { WindowsNativeResolvedKeybinding } from '../../../services/keybinding/common/windowsKeyboardMapper.js';
16
16
  import { themeColorFromId } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService';
@@ -14,9 +14,11 @@ import { IUriIdentityService } from "@codingame/monaco-vscode-api/vscode/vs/plat
14
14
  import { IExtensionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service";
15
15
  import { IHostService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/host/browser/host.service";
16
16
  import { IUserDataProfileService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service";
17
+ import { ILayoutService } from "@codingame/monaco-vscode-api/vscode/vs/platform/layout/browser/layoutService.service";
17
18
  export declare class WorkbenchKeybindingService extends AbstractKeybindingService {
18
19
  private readonly hostService;
19
20
  private readonly keyboardLayoutService;
21
+ private readonly layoutService;
20
22
  private _keyboardMapper;
21
23
  private _cachedResolver;
22
24
  private userKeybindings;
@@ -24,7 +26,7 @@ export declare class WorkbenchKeybindingService extends AbstractKeybindingServic
24
26
  private _keybindingHoldMode;
25
27
  private readonly _contributions;
26
28
  private readonly kbsJsonSchema;
27
- constructor(contextKeyService: IContextKeyService, commandService: ICommandService, telemetryService: ITelemetryService, notificationService: INotificationService, userDataProfileService: IUserDataProfileService, hostService: IHostService, extensionService: IExtensionService, fileService: IFileService, uriIdentityService: IUriIdentityService, logService: ILogService, keyboardLayoutService: IKeyboardLayoutService);
29
+ constructor(contextKeyService: IContextKeyService, commandService: ICommandService, telemetryService: ITelemetryService, notificationService: INotificationService, userDataProfileService: IUserDataProfileService, hostService: IHostService, extensionService: IExtensionService, fileService: IFileService, uriIdentityService: IUriIdentityService, logService: ILogService, keyboardLayoutService: IKeyboardLayoutService, layoutService: ILayoutService);
28
30
  private _registerKeyListeners;
29
31
  registerSchemaContribution(contribution: KeybindingsSchemaContribution): void;
30
32
  private updateKeybindingsJsonSchema;
@@ -45,6 +45,7 @@ import { IHostService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/s
45
45
  import { getAllUnboundCommands } from '@codingame/monaco-vscode-d609a7d3-bf87-551a-884f-550a8b327ec5-common/vscode/vs/workbench/services/keybinding/browser/unboundCommands';
46
46
  import { OutputBuilder, KeybindingIO } from '../common/keybindingIO.js';
47
47
  import { IUserDataProfileService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service';
48
+ import { ILayoutService } from '@codingame/monaco-vscode-api/vscode/vs/platform/layout/browser/layoutService.service';
48
49
 
49
50
  var WorkbenchKeybindingService_1;
50
51
  function isValidContributedKeyBinding(keyBinding, rejects) {
@@ -165,10 +166,11 @@ otherMacNumpadMapping.set(ScanCode.Numpad8, KeyCode.Digit8);
165
166
  otherMacNumpadMapping.set(ScanCode.Numpad9, KeyCode.Digit9);
166
167
  otherMacNumpadMapping.set(ScanCode.Numpad0, KeyCode.Digit0);
167
168
  let WorkbenchKeybindingService = WorkbenchKeybindingService_1 = class WorkbenchKeybindingService extends AbstractKeybindingService {
168
- constructor(contextKeyService, commandService, telemetryService, notificationService, userDataProfileService, hostService, extensionService, fileService, uriIdentityService, logService, keyboardLayoutService) {
169
+ constructor(contextKeyService, commandService, telemetryService, notificationService, userDataProfileService, hostService, extensionService, fileService, uriIdentityService, logService, keyboardLayoutService, layoutService) {
169
170
  super(contextKeyService, commandService, telemetryService, notificationService, logService);
170
171
  this.hostService = hostService;
171
172
  this.keyboardLayoutService = keyboardLayoutService;
173
+ this.layoutService = layoutService;
172
174
  this._contributions = [];
173
175
  this.isComposingGlobalContextKey = contextKeyService.createKey('isComposing', false);
174
176
  this.kbsJsonSchema = ( new KeybindingsJsonSchema());
@@ -221,7 +223,8 @@ let WorkbenchKeybindingService = WorkbenchKeybindingService_1 = class WorkbenchK
221
223
  }
222
224
  _registerKeyListeners(window) {
223
225
  const disposables = ( new DisposableStore());
224
- disposables.add(addDisposableListener(window, EventType.KEY_DOWN, (e) => {
226
+ const container = this.layoutService.getContainer(window);
227
+ disposables.add(addDisposableListener(container, EventType.KEY_DOWN, (e) => {
225
228
  if (this._keybindingHoldMode) {
226
229
  return;
227
230
  }
@@ -235,7 +238,7 @@ let WorkbenchKeybindingService = WorkbenchKeybindingService_1 = class WorkbenchK
235
238
  }
236
239
  this.isComposingGlobalContextKey.set(false);
237
240
  }));
238
- disposables.add(addDisposableListener(window, EventType.KEY_UP, (e) => {
241
+ disposables.add(addDisposableListener(container, EventType.KEY_UP, (e) => {
239
242
  this._resetKeybindingHoldMode();
240
243
  this.isComposingGlobalContextKey.set(e.isComposing);
241
244
  const keyEvent = ( new StandardKeyboardEvent(e));
@@ -638,7 +641,8 @@ WorkbenchKeybindingService = WorkbenchKeybindingService_1 = ( __decorate([
638
641
  ( __param(7, IFileService)),
639
642
  ( __param(8, IUriIdentityService)),
640
643
  ( __param(9, ILogService)),
641
- ( __param(10, IKeyboardLayoutService))
644
+ ( __param(10, IKeyboardLayoutService)),
645
+ ( __param(11, ILayoutService))
642
646
  ], WorkbenchKeybindingService));
643
647
  class UserKeybindings extends Disposable {
644
648
  get keybindings() { return this._keybindings; }