@codingame/monaco-vscode-keybindings-service-override 1.85.6 → 2.0.0-v2.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/keybindings.js +16 -16
- package/package.json +5 -5
- package/vscode/src/vs/base/common/keybindingParser.js +2 -2
- package/vscode/src/vs/platform/keyboardLayout/common/keyboardConfig.js +7 -7
- package/vscode/src/vs/workbench/browser/contextkeys.js +13 -13
- package/vscode/src/vs/workbench/contrib/commands/common/commands.contribution.js +10 -10
- package/vscode/src/vs/workbench/contrib/keybindings/browser/keybindings.contribution.js +6 -6
- package/vscode/src/vs/workbench/services/actions/common/menusExtensionPoint.js +14 -14
- package/vscode/src/vs/workbench/services/commands/common/commandService.js +6 -6
- package/vscode/src/vs/workbench/services/keybinding/browser/keybindingService.js +62 -62
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayoutService.js +18 -18
- package/vscode/src/vs/workbench/services/keybinding/common/keybindingIO.js +1 -1
- package/vscode/src/vs/workbench/services/keybinding/common/keymapInfo.js +1 -1
- package/vscode/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.js +3 -3
- package/vscode/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.js +5 -5
package/keybindings.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { __decorate, __param } from './external/tslib/tslib.es6.js';
|
|
2
|
-
import { StandaloneServices } from '
|
|
3
|
-
import { SyncDescriptor } from '
|
|
2
|
+
import { StandaloneServices } from 'vscode/vscode/vs/editor/standalone/browser/standaloneServices';
|
|
3
|
+
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
4
4
|
import { WorkbenchKeybindingService } from './vscode/src/vs/workbench/services/keybinding/browser/keybindingService.js';
|
|
5
|
-
import { IKeybindingService } from '
|
|
6
|
-
import { VSBuffer } from '
|
|
7
|
-
import { IUserDataProfilesService } from '
|
|
5
|
+
import { IKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/keybinding';
|
|
6
|
+
import { VSBuffer } from 'vscode/vscode/vs/base/common/buffer';
|
|
7
|
+
import { IUserDataProfilesService } from 'vscode/vscode/vs/platform/userDataProfile/common/userDataProfile';
|
|
8
8
|
import { IKeyboardLayoutService } from 'vscode/vscode/vs/platform/keyboardLayout/common/keyboardLayout';
|
|
9
9
|
import { BrowserKeyboardLayoutService } from './vscode/src/vs/workbench/services/keybinding/browser/keyboardLayoutService.js';
|
|
10
|
-
import { IFileService } from '
|
|
11
|
-
import { ICommandService } from '
|
|
10
|
+
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files';
|
|
11
|
+
import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands';
|
|
12
12
|
import { CommandService } from './vscode/src/vs/workbench/services/commands/common/commandService.js';
|
|
13
|
-
import { DisposableStore, toDisposable } from '
|
|
14
|
-
import { IContextKeyService } from '
|
|
15
|
-
import { IUriIdentityService } from '
|
|
16
|
-
import { ITelemetryService } from '
|
|
17
|
-
import { INotificationService } from '
|
|
13
|
+
import { DisposableStore, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
14
|
+
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
15
|
+
import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity';
|
|
16
|
+
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry';
|
|
17
|
+
import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification';
|
|
18
18
|
import { IUserDataProfileService } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile';
|
|
19
19
|
import { IHostService } from 'vscode/vscode/vs/workbench/services/host/browser/host';
|
|
20
20
|
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
|
|
21
|
-
import { ILogService } from '
|
|
21
|
+
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log';
|
|
22
22
|
import { WorkbenchContextKeysHandler } from './vscode/src/vs/workbench/browser/contextkeys.js';
|
|
23
|
-
import { Schemas } from '
|
|
24
|
-
import { URI } from '
|
|
25
|
-
import { IInstantiationService } from '
|
|
23
|
+
import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
24
|
+
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
25
|
+
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
26
26
|
import getServiceOverride$1, { initFile } from '@codingame/monaco-vscode-files-service-override';
|
|
27
27
|
import { onRenderWorkbench } from 'vscode/lifecycle';
|
|
28
28
|
import 'vscode/vscode/vs/workbench/browser/workbench.contribution';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-keybindings-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-v2.1",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
|
-
"url": "git
|
|
12
|
+
"url": "git@github.com:CodinGame/monaco-vscode-api.git"
|
|
13
13
|
},
|
|
14
14
|
"type": "module",
|
|
15
15
|
"private": false,
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"module": "index.js",
|
|
19
19
|
"types": "index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
22
|
-
"
|
|
23
|
-
"@codingame/monaco-vscode-files-service-override": "
|
|
21
|
+
"vscode": "npm:@codingame/monaco-vscode-api@2.0.0-v2.1",
|
|
22
|
+
"vscode-marked": "npm:marked@=3.0.2",
|
|
23
|
+
"@codingame/monaco-vscode-files-service-override": "2.0.0-v2.1"
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ScanCodeUtils, KeyCodeUtils } from '
|
|
2
|
-
import { ScanCodeChord, KeyCodeChord, Keybinding } from '
|
|
1
|
+
import { ScanCodeUtils, KeyCodeUtils } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
2
|
+
import { ScanCodeChord, KeyCodeChord, Keybinding } from 'vscode/vscode/vs/base/common/keybindings';
|
|
3
3
|
|
|
4
4
|
class KeybindingParser {
|
|
5
5
|
static _readModifiers(input) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { OS } from '
|
|
3
|
-
import { Extensions } from '
|
|
4
|
-
import { Registry } from '
|
|
1
|
+
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
2
|
+
import { OS } from 'vscode/vscode/vs/base/common/platform';
|
|
3
|
+
import { Extensions } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
4
|
+
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
5
5
|
|
|
6
6
|
function readKeyboardConfig(configurationService) {
|
|
7
7
|
const keyboard = configurationService.getValue('keyboard');
|
|
@@ -14,7 +14,7 @@ const keyboardConfiguration = {
|
|
|
14
14
|
'id': 'keyboard',
|
|
15
15
|
'order': 15,
|
|
16
16
|
'type': 'object',
|
|
17
|
-
'title': (
|
|
17
|
+
'title': ( localizeWithPath(
|
|
18
18
|
'vs/platform/keyboardLayout/common/keyboardConfig',
|
|
19
19
|
'keyboardConfigurationTitle',
|
|
20
20
|
"Keyboard"
|
|
@@ -25,7 +25,7 @@ const keyboardConfiguration = {
|
|
|
25
25
|
type: 'string',
|
|
26
26
|
enum: ['code', 'keyCode'],
|
|
27
27
|
default: 'code',
|
|
28
|
-
markdownDescription: (
|
|
28
|
+
markdownDescription: ( localizeWithPath(
|
|
29
29
|
'vs/platform/keyboardLayout/common/keyboardConfig',
|
|
30
30
|
'dispatch',
|
|
31
31
|
"Controls the dispatching logic for key presses to use either `code` (recommended) or `keyCode`."
|
|
@@ -36,7 +36,7 @@ const keyboardConfiguration = {
|
|
|
36
36
|
scope: 1 ,
|
|
37
37
|
type: 'boolean',
|
|
38
38
|
default: false,
|
|
39
|
-
markdownDescription: (
|
|
39
|
+
markdownDescription: ( localizeWithPath(
|
|
40
40
|
'vs/platform/keyboardLayout/common/keyboardConfig',
|
|
41
41
|
'mapAltGrToCtrlAlt',
|
|
42
42
|
"Controls if the AltGraph+ modifier should be treated as Ctrl+Alt+."
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { Event } from '
|
|
3
|
-
import { Disposable } from '
|
|
4
|
-
import { setConstant, IContextKeyService } from '
|
|
5
|
-
import { IsMacContext, IsLinuxContext, IsWindowsContext, IsWebContext, IsMacNativeContext, IsIOSContext, IsMobileContext, IsDevelopmentContext, ProductQualityContext, InputFocusedContext } from '
|
|
2
|
+
import { Event } from 'vscode/vscode/vs/base/common/event';
|
|
3
|
+
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
|
+
import { setConstant, IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
5
|
+
import { IsMacContext, IsLinuxContext, IsWindowsContext, IsWebContext, IsMacNativeContext, IsIOSContext, IsMobileContext, IsDevelopmentContext, ProductQualityContext, InputFocusedContext } from 'vscode/vscode/vs/platform/contextkey/common/contextkeys';
|
|
6
6
|
import { RemoteNameContext, VirtualWorkspaceContext, TemporaryWorkspaceContext, HasWebFileSystemAccess, EmbedderIdentifierContext, ActiveEditorContext, ActiveEditorReadonlyContext, ActiveEditorCanToggleReadonlyContext, ActiveEditorCanRevertContext, ActiveEditorCanSplitInGroupContext, ActiveEditorAvailableEditorIdsContext, EditorsVisibleContext, TextCompareEditorVisibleContext, TextCompareEditorActiveContext, SideBySideEditorActiveContext, ActiveEditorGroupEmptyContext, ActiveEditorGroupIndexContext, ActiveEditorGroupLastContext, ActiveEditorGroupLockedContext, MultipleEditorGroupsContext, DirtyWorkingCopiesContext, WorkbenchStateContext, WorkspaceFolderCountContext, OpenFolderWorkspaceSupportContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, SplitEditorsVertically, IsFullscreenContext, IsAuxiliaryWindowFocusedContext, InEditorZenModeContext, IsCenteredLayoutContext, MainEditorAreaVisibleContext, EditorTabsVisibleContext, SideBarVisibleContext, TitleBarVisibleContext, TitleBarStyleContext, PanelPositionContext, PanelVisibleContext, PanelMaximizedContext, PanelAlignmentContext, AuxiliaryBarVisibleContext, applyAvailableEditorIds } from 'vscode/vscode/vs/workbench/common/contextkeys';
|
|
7
7
|
import { TEXT_DIFF_EDITOR_ID, SIDE_BY_SIDE_EDITOR_ID, EditorResourceAccessor, SideBySideEditor } from 'vscode/vscode/vs/workbench/common/editor';
|
|
8
|
-
import { onDidRegisterWindow, addDisposableListener, EventType, trackFocus, getActiveWindow } from '
|
|
8
|
+
import { onDidRegisterWindow, addDisposableListener, EventType, trackFocus, getActiveWindow } from 'vscode/vscode/vs/base/browser/dom';
|
|
9
9
|
import { preferredSideBySideGroupDirection, IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService';
|
|
10
|
-
import { IConfigurationService } from '
|
|
10
|
+
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
|
|
11
11
|
import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/common/environmentService';
|
|
12
12
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
|
|
13
|
-
import { isTemporaryWorkspace, IWorkspaceContextService } from '
|
|
13
|
+
import { isTemporaryWorkspace, IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace';
|
|
14
14
|
import { positionToString, IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
15
|
-
import { getRemoteName } from '
|
|
15
|
+
import { getRemoteName } from 'vscode/vscode/vs/platform/remote/common/remoteHosts';
|
|
16
16
|
import { getVirtualWorkspaceScheme } from 'vscode/vscode/vs/platform/workspace/common/virtualWorkspace';
|
|
17
17
|
import { IWorkingCopyService } from 'vscode/vscode/vs/workbench/services/workingCopy/common/workingCopyService';
|
|
18
|
-
import { isNative } from '
|
|
18
|
+
import { isNative } from 'vscode/vscode/vs/base/common/platform';
|
|
19
19
|
import { IEditorResolverService } from 'vscode/vscode/vs/workbench/services/editor/common/editorResolverService';
|
|
20
20
|
import { IPaneCompositePartService } from 'vscode/vscode/vs/workbench/services/panecomposite/browser/panecomposite';
|
|
21
|
-
import { WebFileSystemAccess } from '
|
|
22
|
-
import { IProductService } from '
|
|
23
|
-
import { IFileService } from '
|
|
21
|
+
import { WebFileSystemAccess } from 'vscode/vscode/vs/platform/files/browser/webFileSystemAccess';
|
|
22
|
+
import { IProductService } from 'vscode/vscode/vs/platform/product/common/productService';
|
|
23
|
+
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files';
|
|
24
24
|
import { getTitleBarStyle } from 'vscode/vscode/vs/platform/window/common/window';
|
|
25
|
-
import { mainWindow } from '
|
|
25
|
+
import { mainWindow } from 'vscode/vscode/vs/base/browser/window';
|
|
26
26
|
|
|
27
27
|
let WorkbenchContextKeysHandler = class WorkbenchContextKeysHandler extends Disposable {
|
|
28
28
|
constructor(contextKeyService, contextService, configurationService, environmentService, productService, editorService, editorResolverService, editorGroupService, layoutService, paneCompositeService, workingCopyService, fileService) {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { registerAction2, Action2 } from '
|
|
3
|
-
import { ICommandService } from '
|
|
4
|
-
import { ILogService } from '
|
|
5
|
-
import { INotificationService } from '
|
|
1
|
+
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
2
|
+
import { registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
3
|
+
import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands';
|
|
4
|
+
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log';
|
|
5
|
+
import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification';
|
|
6
6
|
|
|
7
7
|
class RunCommands extends Action2 {
|
|
8
8
|
constructor() {
|
|
9
9
|
super({
|
|
10
10
|
id: 'runCommands',
|
|
11
|
-
title: { value: (
|
|
11
|
+
title: { value: ( localizeWithPath(
|
|
12
12
|
'vs/workbench/contrib/commands/common/commands.contribution',
|
|
13
13
|
'runCommands',
|
|
14
14
|
"Run Commands"
|
|
15
15
|
)), original: 'Run Commands' },
|
|
16
16
|
f1: false,
|
|
17
17
|
metadata: {
|
|
18
|
-
description: (
|
|
18
|
+
description: ( localizeWithPath(
|
|
19
19
|
'vs/workbench/contrib/commands/common/commands.contribution',
|
|
20
20
|
'runCommands.description',
|
|
21
21
|
"Run several commands"
|
|
@@ -29,7 +29,7 @@ class RunCommands extends Action2 {
|
|
|
29
29
|
properties: {
|
|
30
30
|
commands: {
|
|
31
31
|
type: 'array',
|
|
32
|
-
description: (
|
|
32
|
+
description: ( localizeWithPath(
|
|
33
33
|
'vs/workbench/contrib/commands/common/commands.contribution',
|
|
34
34
|
'runCommands.commands',
|
|
35
35
|
"Commands to run"
|
|
@@ -72,7 +72,7 @@ class RunCommands extends Action2 {
|
|
|
72
72
|
async run(accessor, args) {
|
|
73
73
|
const notificationService = accessor.get(INotificationService);
|
|
74
74
|
if (!this._isCommandArgs(args)) {
|
|
75
|
-
notificationService.error((
|
|
75
|
+
notificationService.error(( localizeWithPath(
|
|
76
76
|
'vs/workbench/contrib/commands/common/commands.contribution',
|
|
77
77
|
'runCommands.invalidArgs',
|
|
78
78
|
"'runCommands' has received an argument with incorrect type. Please, review the argument passed to the command."
|
|
@@ -80,7 +80,7 @@ class RunCommands extends Action2 {
|
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
82
|
if (args.commands.length === 0) {
|
|
83
|
-
notificationService.warn((
|
|
83
|
+
notificationService.warn(( localizeWithPath(
|
|
84
84
|
'vs/workbench/contrib/commands/common/commands.contribution',
|
|
85
85
|
'runCommands.noCommandsToRun',
|
|
86
86
|
"'runCommands' has not received commands to run. Did you forget to pass commands in the 'runCommands' argument?"
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { registerAction2, Action2 } from '
|
|
3
|
-
import { IKeybindingService } from '
|
|
4
|
-
import { Categories } from '
|
|
5
|
-
import { ICommandService } from '
|
|
1
|
+
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
2
|
+
import { registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
3
|
+
import { IKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/keybinding';
|
|
4
|
+
import { Categories } from 'vscode/vscode/vs/platform/action/common/actionCommonCategories';
|
|
5
|
+
import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands';
|
|
6
6
|
import { showWindowLogActionId } from 'vscode/vscode/vs/workbench/services/log/common/logConstants';
|
|
7
7
|
|
|
8
8
|
class ToggleKeybindingsLogAction extends Action2 {
|
|
9
9
|
constructor() {
|
|
10
10
|
super({
|
|
11
11
|
id: 'workbench.action.toggleKeybindingsLog',
|
|
12
|
-
title: { value: (
|
|
12
|
+
title: { value: ( localizeWithPath(
|
|
13
13
|
'vs/workbench/contrib/keybindings/browser/keybindings.contribution',
|
|
14
14
|
'toggleKeybindingsLog',
|
|
15
15
|
"Toggle Keyboard Shortcuts Troubleshooting"
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { localizeWithPath } from '
|
|
2
|
-
import { isFalsyOrWhitespace } from '
|
|
3
|
-
import
|
|
1
|
+
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
2
|
+
import { isFalsyOrWhitespace } from 'vscode/vscode/vs/base/common/strings';
|
|
3
|
+
import { joinPath } from 'vscode/vscode/vs/base/common/resources';
|
|
4
4
|
import { ExtensionsRegistry } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionsRegistry';
|
|
5
|
-
import { ContextKeyExpr } from '
|
|
6
|
-
import { MenuId, MenuRegistry } from '
|
|
7
|
-
import { DisposableStore } from '
|
|
8
|
-
import { ThemeIcon } from '
|
|
9
|
-
import { index } from '
|
|
5
|
+
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
6
|
+
import { MenuId, MenuRegistry } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
7
|
+
import { DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
8
|
+
import { ThemeIcon } from 'vscode/vscode/vs/base/common/themables';
|
|
9
|
+
import { index } from 'vscode/vscode/vs/base/common/arrays';
|
|
10
10
|
import { isProposedApiEnabled } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
|
|
11
11
|
|
|
12
12
|
const apiMenus = [
|
|
@@ -1053,12 +1053,12 @@ commandsExtensionPoint.setHandler(extensions => {
|
|
|
1053
1053
|
let absoluteIcon;
|
|
1054
1054
|
if (icon) {
|
|
1055
1055
|
if (typeof icon === 'string') {
|
|
1056
|
-
absoluteIcon = ThemeIcon.fromString(icon) ?? { dark:
|
|
1056
|
+
absoluteIcon = ThemeIcon.fromString(icon) ?? { dark: joinPath(extension.description.extensionLocation, icon), light: joinPath(extension.description.extensionLocation, icon) };
|
|
1057
1057
|
}
|
|
1058
1058
|
else {
|
|
1059
1059
|
absoluteIcon = {
|
|
1060
|
-
dark:
|
|
1061
|
-
light:
|
|
1060
|
+
dark: joinPath(extension.description.extensionLocation, icon.dark),
|
|
1061
|
+
light: joinPath(extension.description.extensionLocation, icon.light)
|
|
1062
1062
|
};
|
|
1063
1063
|
}
|
|
1064
1064
|
}
|
|
@@ -1150,12 +1150,12 @@ submenusExtensionPoint.setHandler(extensions => {
|
|
|
1150
1150
|
let absoluteIcon;
|
|
1151
1151
|
if (submenuInfo.icon) {
|
|
1152
1152
|
if (typeof submenuInfo.icon === 'string') {
|
|
1153
|
-
absoluteIcon = ThemeIcon.fromString(submenuInfo.icon) || { dark:
|
|
1153
|
+
absoluteIcon = ThemeIcon.fromString(submenuInfo.icon) || { dark: joinPath(extension.description.extensionLocation, submenuInfo.icon) };
|
|
1154
1154
|
}
|
|
1155
1155
|
else {
|
|
1156
1156
|
absoluteIcon = {
|
|
1157
|
-
dark:
|
|
1158
|
-
light:
|
|
1157
|
+
dark: joinPath(extension.description.extensionLocation, submenuInfo.icon.dark),
|
|
1158
|
+
light: joinPath(extension.description.extensionLocation, submenuInfo.icon.light)
|
|
1159
1159
|
};
|
|
1160
1160
|
}
|
|
1161
1161
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { IInstantiationService } from '
|
|
3
|
-
import { CommandsRegistry } from '
|
|
2
|
+
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
3
|
+
import { CommandsRegistry } from 'vscode/vscode/vs/platform/commands/common/commands';
|
|
4
4
|
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
|
|
5
|
-
import { Emitter, Event } from '
|
|
6
|
-
import { Disposable } from '
|
|
7
|
-
import { ILogService } from '
|
|
8
|
-
import { timeout } from '
|
|
5
|
+
import { Emitter, Event } from 'vscode/vscode/vs/base/common/event';
|
|
6
|
+
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
7
|
+
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log';
|
|
8
|
+
import { timeout } from 'vscode/vscode/vs/base/common/async';
|
|
9
9
|
|
|
10
10
|
let CommandService = class CommandService extends Disposable {
|
|
11
11
|
constructor(_instantiationService, _extensionService, _logService) {
|
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { BrowserFeatures } from '
|
|
5
|
-
import
|
|
6
|
-
import { StandardKeyboardEvent, printKeyboardEvent, printStandardKeyboardEvent } from '
|
|
7
|
-
import { RunOnceScheduler } from '
|
|
8
|
-
import { Event, Emitter } from '
|
|
9
|
-
import { parse } from '
|
|
10
|
-
import { UserSettingsLabelProvider } from '
|
|
2
|
+
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
3
|
+
import { onDidChangeFullscreen, isFullscreen } from 'vscode/vscode/vs/base/browser/browser';
|
|
4
|
+
import { BrowserFeatures } from 'vscode/vscode/vs/base/browser/canIUse';
|
|
5
|
+
import { onDidRegisterWindow, addDisposableListener, EventType } from 'vscode/vscode/vs/base/browser/dom';
|
|
6
|
+
import { StandardKeyboardEvent, printKeyboardEvent, printStandardKeyboardEvent } from 'vscode/vscode/vs/base/browser/keyboardEvent';
|
|
7
|
+
import { RunOnceScheduler } from 'vscode/vscode/vs/base/common/async';
|
|
8
|
+
import { Event, Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
9
|
+
import { parse } from 'vscode/vscode/vs/base/common/json';
|
|
10
|
+
import { UserSettingsLabelProvider } from 'vscode/vscode/vs/base/common/keybindingLabels';
|
|
11
11
|
import { KeybindingParser } from '../../../../base/common/keybindingParser.js';
|
|
12
|
-
import { KeyCodeChord, ScanCodeChord } from '
|
|
13
|
-
import { KeyCodeUtils, ScanCodeUtils, IMMUTABLE_CODE_TO_KEY_CODE } from '
|
|
14
|
-
import { DisposableStore, Disposable } from '
|
|
15
|
-
import
|
|
16
|
-
import { OS, isMacintosh } from '
|
|
17
|
-
import { dirname } from '
|
|
18
|
-
import { mainWindow } from '
|
|
19
|
-
import { MenuRegistry } from '
|
|
20
|
-
import { CommandsRegistry, ICommandService } from '
|
|
21
|
-
import { ContextKeyExpr, IContextKeyService } from '
|
|
22
|
-
import { IFileService } from '
|
|
23
|
-
import { Extensions } from '
|
|
24
|
-
import { AbstractKeybindingService } from '
|
|
25
|
-
import { KeybindingResolver } from '
|
|
26
|
-
import { KeybindingsRegistry } from '
|
|
27
|
-
import { ResolvedKeybindingItem } from '
|
|
12
|
+
import { KeyCodeChord, ScanCodeChord } from 'vscode/vscode/vs/base/common/keybindings';
|
|
13
|
+
import { KeyCodeUtils, ScanCodeUtils, IMMUTABLE_CODE_TO_KEY_CODE } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
14
|
+
import { DisposableStore, Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
15
|
+
import { equals } from 'vscode/vscode/vs/base/common/objects';
|
|
16
|
+
import { OS, isMacintosh } from 'vscode/vscode/vs/base/common/platform';
|
|
17
|
+
import { dirname } from 'vscode/vscode/vs/base/common/resources';
|
|
18
|
+
import { mainWindow } from 'vscode/vscode/vs/base/browser/window';
|
|
19
|
+
import { MenuRegistry } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
20
|
+
import { CommandsRegistry, ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands';
|
|
21
|
+
import { ContextKeyExpr, IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
22
|
+
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files';
|
|
23
|
+
import { Extensions } from 'vscode/vscode/vs/platform/jsonschemas/common/jsonContributionRegistry';
|
|
24
|
+
import { AbstractKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/abstractKeybindingService';
|
|
25
|
+
import { KeybindingResolver } from 'vscode/vscode/vs/platform/keybinding/common/keybindingResolver';
|
|
26
|
+
import { KeybindingsRegistry } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
27
|
+
import { ResolvedKeybindingItem } from 'vscode/vscode/vs/platform/keybinding/common/resolvedKeybindingItem';
|
|
28
28
|
import { IKeyboardLayoutService } from 'vscode/vscode/vs/platform/keyboardLayout/common/keyboardLayout';
|
|
29
|
-
import { ILogService } from '
|
|
30
|
-
import { INotificationService } from '
|
|
31
|
-
import { Registry } from '
|
|
32
|
-
import { ITelemetryService } from '
|
|
33
|
-
import { IUriIdentityService } from '
|
|
34
|
-
import { isLocalizedString } from '
|
|
29
|
+
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log';
|
|
30
|
+
import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification';
|
|
31
|
+
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
32
|
+
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry';
|
|
33
|
+
import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity';
|
|
34
|
+
import { isLocalizedString } from 'vscode/vscode/vs/platform/action/common/action';
|
|
35
35
|
import { commandsExtensionPoint } from '../../actions/common/menusExtensionPoint.js';
|
|
36
36
|
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
|
|
37
37
|
import { ExtensionsRegistry } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionsRegistry';
|
|
@@ -43,7 +43,7 @@ import { IUserDataProfileService } from 'vscode/vscode/vs/workbench/services/use
|
|
|
43
43
|
var WorkbenchKeybindingService_1;
|
|
44
44
|
function isValidContributedKeyBinding(keyBinding, rejects) {
|
|
45
45
|
if (!keyBinding) {
|
|
46
|
-
rejects.push((
|
|
46
|
+
rejects.push(( localizeWithPath(
|
|
47
47
|
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
48
48
|
'nonempty',
|
|
49
49
|
"expected non-empty value."
|
|
@@ -51,7 +51,7 @@ function isValidContributedKeyBinding(keyBinding, rejects) {
|
|
|
51
51
|
return false;
|
|
52
52
|
}
|
|
53
53
|
if (typeof keyBinding.command !== 'string') {
|
|
54
|
-
rejects.push((
|
|
54
|
+
rejects.push(( localizeWithPath(
|
|
55
55
|
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
56
56
|
'requirestring',
|
|
57
57
|
"property `{0}` is mandatory and must be of type `string`",
|
|
@@ -60,7 +60,7 @@ function isValidContributedKeyBinding(keyBinding, rejects) {
|
|
|
60
60
|
return false;
|
|
61
61
|
}
|
|
62
62
|
if (keyBinding.key && typeof keyBinding.key !== 'string') {
|
|
63
|
-
rejects.push((
|
|
63
|
+
rejects.push(( localizeWithPath(
|
|
64
64
|
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
65
65
|
'optstring',
|
|
66
66
|
"property `{0}` can be omitted or must be of type `string`",
|
|
@@ -69,7 +69,7 @@ function isValidContributedKeyBinding(keyBinding, rejects) {
|
|
|
69
69
|
return false;
|
|
70
70
|
}
|
|
71
71
|
if (keyBinding.when && typeof keyBinding.when !== 'string') {
|
|
72
|
-
rejects.push((
|
|
72
|
+
rejects.push(( localizeWithPath(
|
|
73
73
|
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
74
74
|
'optstring',
|
|
75
75
|
"property `{0}` can be omitted or must be of type `string`",
|
|
@@ -78,7 +78,7 @@ function isValidContributedKeyBinding(keyBinding, rejects) {
|
|
|
78
78
|
return false;
|
|
79
79
|
}
|
|
80
80
|
if (keyBinding.mac && typeof keyBinding.mac !== 'string') {
|
|
81
|
-
rejects.push((
|
|
81
|
+
rejects.push(( localizeWithPath(
|
|
82
82
|
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
83
83
|
'optstring',
|
|
84
84
|
"property `{0}` can be omitted or must be of type `string`",
|
|
@@ -87,7 +87,7 @@ function isValidContributedKeyBinding(keyBinding, rejects) {
|
|
|
87
87
|
return false;
|
|
88
88
|
}
|
|
89
89
|
if (keyBinding.linux && typeof keyBinding.linux !== 'string') {
|
|
90
|
-
rejects.push((
|
|
90
|
+
rejects.push(( localizeWithPath(
|
|
91
91
|
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
92
92
|
'optstring',
|
|
93
93
|
"property `{0}` can be omitted or must be of type `string`",
|
|
@@ -96,7 +96,7 @@ function isValidContributedKeyBinding(keyBinding, rejects) {
|
|
|
96
96
|
return false;
|
|
97
97
|
}
|
|
98
98
|
if (keyBinding.win && typeof keyBinding.win !== 'string') {
|
|
99
|
-
rejects.push((
|
|
99
|
+
rejects.push(( localizeWithPath(
|
|
100
100
|
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
101
101
|
'optstring',
|
|
102
102
|
"property `{0}` can be omitted or must be of type `string`",
|
|
@@ -111,7 +111,7 @@ const keybindingType = {
|
|
|
111
111
|
default: { command: '', key: '' },
|
|
112
112
|
properties: {
|
|
113
113
|
command: {
|
|
114
|
-
description: (
|
|
114
|
+
description: ( localizeWithPath(
|
|
115
115
|
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
116
116
|
'vscode.extension.contributes.keybindings.command',
|
|
117
117
|
'Identifier of the command to run when keybinding is triggered.'
|
|
@@ -119,14 +119,14 @@ const keybindingType = {
|
|
|
119
119
|
type: 'string'
|
|
120
120
|
},
|
|
121
121
|
args: {
|
|
122
|
-
description: (
|
|
122
|
+
description: ( localizeWithPath(
|
|
123
123
|
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
124
124
|
'vscode.extension.contributes.keybindings.args',
|
|
125
125
|
"Arguments to pass to the command to execute."
|
|
126
126
|
))
|
|
127
127
|
},
|
|
128
128
|
key: {
|
|
129
|
-
description: (
|
|
129
|
+
description: ( localizeWithPath(
|
|
130
130
|
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
131
131
|
'vscode.extension.contributes.keybindings.key',
|
|
132
132
|
'Key or key sequence (separate keys with plus-sign and sequences with space, e.g. Ctrl+O and Ctrl+L L for a chord).'
|
|
@@ -134,7 +134,7 @@ const keybindingType = {
|
|
|
134
134
|
type: 'string'
|
|
135
135
|
},
|
|
136
136
|
mac: {
|
|
137
|
-
description: (
|
|
137
|
+
description: ( localizeWithPath(
|
|
138
138
|
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
139
139
|
'vscode.extension.contributes.keybindings.mac',
|
|
140
140
|
'Mac specific key or key sequence.'
|
|
@@ -142,7 +142,7 @@ const keybindingType = {
|
|
|
142
142
|
type: 'string'
|
|
143
143
|
},
|
|
144
144
|
linux: {
|
|
145
|
-
description: (
|
|
145
|
+
description: ( localizeWithPath(
|
|
146
146
|
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
147
147
|
'vscode.extension.contributes.keybindings.linux',
|
|
148
148
|
'Linux specific key or key sequence.'
|
|
@@ -150,7 +150,7 @@ const keybindingType = {
|
|
|
150
150
|
type: 'string'
|
|
151
151
|
},
|
|
152
152
|
win: {
|
|
153
|
-
description: (
|
|
153
|
+
description: ( localizeWithPath(
|
|
154
154
|
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
155
155
|
'vscode.extension.contributes.keybindings.win',
|
|
156
156
|
'Windows specific key or key sequence.'
|
|
@@ -158,7 +158,7 @@ const keybindingType = {
|
|
|
158
158
|
type: 'string'
|
|
159
159
|
},
|
|
160
160
|
when: {
|
|
161
|
-
description: (
|
|
161
|
+
description: ( localizeWithPath(
|
|
162
162
|
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
163
163
|
'vscode.extension.contributes.keybindings.when',
|
|
164
164
|
'Condition when the key is active.'
|
|
@@ -171,7 +171,7 @@ const keybindingsExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
|
171
171
|
extensionPoint: 'keybindings',
|
|
172
172
|
deps: [commandsExtensionPoint],
|
|
173
173
|
jsonSchema: {
|
|
174
|
-
description: (
|
|
174
|
+
description: ( localizeWithPath(
|
|
175
175
|
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
176
176
|
'vscode.extension.contributes.keybindings',
|
|
177
177
|
"Contributes keybindings."
|
|
@@ -248,13 +248,13 @@ let WorkbenchKeybindingService = WorkbenchKeybindingService_1 = class WorkbenchK
|
|
|
248
248
|
});
|
|
249
249
|
this.updateKeybindingsJsonSchema();
|
|
250
250
|
this._register(extensionService.onDidRegisterExtensions(() => this.updateKeybindingsJsonSchema()));
|
|
251
|
-
this._register(Event.runAndSubscribe(
|
|
252
|
-
this._register(
|
|
251
|
+
this._register(Event.runAndSubscribe(onDidRegisterWindow, ({ window, disposables }) => disposables.add(this._registerKeyListeners(window)), { window: mainWindow, disposables: this._store }));
|
|
252
|
+
this._register(onDidChangeFullscreen(() => {
|
|
253
253
|
const keyboard = navigator.keyboard;
|
|
254
254
|
if (BrowserFeatures.keyboard === 2 ) {
|
|
255
255
|
return;
|
|
256
256
|
}
|
|
257
|
-
if (
|
|
257
|
+
if (isFullscreen()) {
|
|
258
258
|
keyboard?.lock(['Escape']);
|
|
259
259
|
}
|
|
260
260
|
else {
|
|
@@ -266,7 +266,7 @@ let WorkbenchKeybindingService = WorkbenchKeybindingService_1 = class WorkbenchK
|
|
|
266
266
|
}
|
|
267
267
|
_registerKeyListeners(window) {
|
|
268
268
|
const disposables = ( new DisposableStore());
|
|
269
|
-
disposables.add(
|
|
269
|
+
disposables.add(addDisposableListener(window, EventType.KEY_DOWN, (e) => {
|
|
270
270
|
this.isComposingGlobalContextKey.set(e.isComposing);
|
|
271
271
|
const keyEvent = ( new StandardKeyboardEvent(e));
|
|
272
272
|
this._log(`/ Received keydown event - ${printKeyboardEvent(e)}`);
|
|
@@ -277,7 +277,7 @@ let WorkbenchKeybindingService = WorkbenchKeybindingService_1 = class WorkbenchK
|
|
|
277
277
|
}
|
|
278
278
|
this.isComposingGlobalContextKey.set(false);
|
|
279
279
|
}));
|
|
280
|
-
disposables.add(
|
|
280
|
+
disposables.add(addDisposableListener(window, EventType.KEY_UP, (e) => {
|
|
281
281
|
this.isComposingGlobalContextKey.set(e.isComposing);
|
|
282
282
|
const keyEvent = ( new StandardKeyboardEvent(e));
|
|
283
283
|
const shouldPreventDefault = this._singleModifierDispatch(keyEvent, keyEvent.target);
|
|
@@ -455,7 +455,7 @@ let WorkbenchKeybindingService = WorkbenchKeybindingService_1 = class WorkbenchK
|
|
|
455
455
|
if (BrowserFeatures.keyboard === 0 ) {
|
|
456
456
|
return false;
|
|
457
457
|
}
|
|
458
|
-
if (BrowserFeatures.keyboard === 1 &&
|
|
458
|
+
if (BrowserFeatures.keyboard === 1 && isFullscreen()) {
|
|
459
459
|
return false;
|
|
460
460
|
}
|
|
461
461
|
for (const chord of keybinding.chords) {
|
|
@@ -525,7 +525,7 @@ let WorkbenchKeybindingService = WorkbenchKeybindingService_1 = class WorkbenchK
|
|
|
525
525
|
}
|
|
526
526
|
}
|
|
527
527
|
if (rejects.length > 0) {
|
|
528
|
-
collector.error((
|
|
528
|
+
collector.error(( localizeWithPath(
|
|
529
529
|
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
530
530
|
'invalid.keybindings',
|
|
531
531
|
"Invalid `contributes.{0}`: {1}",
|
|
@@ -615,7 +615,7 @@ let WorkbenchKeybindingService = WorkbenchKeybindingService_1 = class WorkbenchK
|
|
|
615
615
|
static _getAllCommandsAsComment(boundCommands) {
|
|
616
616
|
const unboundCommands = getAllUnboundCommands(boundCommands);
|
|
617
617
|
const pretty = unboundCommands.sort().join('\n// - ');
|
|
618
|
-
return '// ' + (
|
|
618
|
+
return '// ' + ( localizeWithPath(
|
|
619
619
|
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
620
620
|
'unboundCommands',
|
|
621
621
|
"Here are other available commands: "
|
|
@@ -714,7 +714,7 @@ class UserKeybindings extends Disposable {
|
|
|
714
714
|
}
|
|
715
715
|
async reload() {
|
|
716
716
|
const newKeybindings = await this.readUserKeybindings();
|
|
717
|
-
if (
|
|
717
|
+
if (equals(this._rawKeybindings, newKeybindings)) {
|
|
718
718
|
return false;
|
|
719
719
|
}
|
|
720
720
|
this._rawKeybindings = newKeybindings;
|
|
@@ -744,7 +744,7 @@ class KeybindingsJsonSchema {
|
|
|
744
744
|
this.schema = {
|
|
745
745
|
id: KeybindingsJsonSchema.schemaId,
|
|
746
746
|
type: 'array',
|
|
747
|
-
title: (
|
|
747
|
+
title: ( localizeWithPath(
|
|
748
748
|
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
749
749
|
'keybindings.json.title',
|
|
750
750
|
"Keybindings configuration"
|
|
@@ -772,7 +772,7 @@ class KeybindingsJsonSchema {
|
|
|
772
772
|
'type': 'string',
|
|
773
773
|
'enum': this.commandsEnum,
|
|
774
774
|
'enumDescriptions': this.commandsEnumDescriptions,
|
|
775
|
-
'description': (
|
|
775
|
+
'description': ( localizeWithPath(
|
|
776
776
|
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
777
777
|
'keybindings.json.command',
|
|
778
778
|
"Name of the command to execute"
|
|
@@ -787,7 +787,7 @@ class KeybindingsJsonSchema {
|
|
|
787
787
|
'type': 'string',
|
|
788
788
|
'enum': this.removalCommandsEnum,
|
|
789
789
|
'enumDescriptions': this.commandsEnumDescriptions,
|
|
790
|
-
'description': (
|
|
790
|
+
'description': ( localizeWithPath(
|
|
791
791
|
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
792
792
|
'keybindings.json.removalCommand',
|
|
793
793
|
"Name of the command to remove keyboard shortcut for"
|
|
@@ -809,7 +809,7 @@ class KeybindingsJsonSchema {
|
|
|
809
809
|
'properties': {
|
|
810
810
|
'key': {
|
|
811
811
|
'type': 'string',
|
|
812
|
-
'description': (
|
|
812
|
+
'description': ( localizeWithPath(
|
|
813
813
|
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
814
814
|
'keybindings.json.key',
|
|
815
815
|
"Key or key sequence (separated by space)"
|
|
@@ -825,7 +825,7 @@ class KeybindingsJsonSchema {
|
|
|
825
825
|
'not': {
|
|
826
826
|
'type': 'array'
|
|
827
827
|
},
|
|
828
|
-
'errorMessage': (
|
|
828
|
+
'errorMessage': ( localizeWithPath(
|
|
829
829
|
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
830
830
|
'keybindings.commandsIsArray',
|
|
831
831
|
"Incorrect type. Expected \"{0}\". The field 'command' does not support running multiple commands. Use command 'runCommands' to pass it multiple commands to run.",
|
|
@@ -843,14 +843,14 @@ class KeybindingsJsonSchema {
|
|
|
843
843
|
},
|
|
844
844
|
'when': {
|
|
845
845
|
'type': 'string',
|
|
846
|
-
'description': (
|
|
846
|
+
'description': ( localizeWithPath(
|
|
847
847
|
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
848
848
|
'keybindings.json.when',
|
|
849
849
|
"Condition when the key is active."
|
|
850
850
|
))
|
|
851
851
|
},
|
|
852
852
|
'args': {
|
|
853
|
-
'description': (
|
|
853
|
+
'description': ( localizeWithPath(
|
|
854
854
|
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
855
855
|
'keybindings.json.args',
|
|
856
856
|
"Arguments to pass to the command to execute."
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import
|
|
3
|
-
import { Emitter, Event } from '
|
|
4
|
-
import { Disposable } from '
|
|
2
|
+
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
3
|
+
import { Emitter, Event } from 'vscode/vscode/vs/base/common/event';
|
|
4
|
+
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
5
5
|
import { KeymapInfo } from '../common/keymapInfo.js';
|
|
6
6
|
import { readKeyboardConfig } from '../../../../platform/keyboardLayout/common/keyboardConfig.js';
|
|
7
7
|
import { CachedKeyboardMapper } from '../../../../platform/keyboardLayout/common/keyboardMapper.js';
|
|
8
|
-
import { OS, isWindows, isMacintosh } from '
|
|
8
|
+
import { OS, isWindows, isMacintosh } from 'vscode/vscode/vs/base/common/platform';
|
|
9
9
|
import { WindowsKeyboardMapper } from '../common/windowsKeyboardMapper.js';
|
|
10
10
|
import { FallbackKeyboardMapper } from 'vscode/vscode/vs/workbench/services/keybinding/common/fallbackKeyboardMapper';
|
|
11
11
|
import { MacLinuxKeyboardMapper } from '../common/macLinuxKeyboardMapper.js';
|
|
12
|
-
import { IFileService } from '
|
|
13
|
-
import { RunOnceScheduler } from '
|
|
14
|
-
import { parse, getNodeType } from '
|
|
15
|
-
import
|
|
16
|
-
import { IEnvironmentService } from '
|
|
17
|
-
import { Registry } from '
|
|
18
|
-
import { Extensions } from '
|
|
19
|
-
import { IConfigurationService } from '
|
|
20
|
-
import { INotificationService } from '
|
|
21
|
-
import { ICommandService } from '
|
|
22
|
-
import { IStorageService } from '
|
|
12
|
+
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files';
|
|
13
|
+
import { RunOnceScheduler } from 'vscode/vscode/vs/base/common/async';
|
|
14
|
+
import { parse, getNodeType } from 'vscode/vscode/vs/base/common/json';
|
|
15
|
+
import { equals } from 'vscode/vscode/vs/base/common/objects';
|
|
16
|
+
import { IEnvironmentService } from 'vscode/vscode/vs/platform/environment/common/environment';
|
|
17
|
+
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
18
|
+
import { Extensions } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
19
|
+
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
|
|
20
|
+
import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification';
|
|
21
|
+
import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands';
|
|
22
|
+
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
23
23
|
import { getKeyboardLayoutId } from 'vscode/vscode/vs/platform/keyboardLayout/common/keyboardLayout';
|
|
24
24
|
|
|
25
25
|
function __variableDynamicImportRuntime0__(path) {
|
|
@@ -378,7 +378,7 @@ class UserKeyboardLayout extends Disposable {
|
|
|
378
378
|
catch (e) {
|
|
379
379
|
this._keyboardLayout = null;
|
|
380
380
|
}
|
|
381
|
-
return existing ? !
|
|
381
|
+
return existing ? !equals(existing, this._keyboardLayout) : true;
|
|
382
382
|
}
|
|
383
383
|
}
|
|
384
384
|
let BrowserKeyboardLayoutService = class BrowserKeyboardLayoutService extends Disposable {
|
|
@@ -478,7 +478,7 @@ const keyboardConfiguration = {
|
|
|
478
478
|
'id': 'keyboard',
|
|
479
479
|
'order': 15,
|
|
480
480
|
'type': 'object',
|
|
481
|
-
'title': (
|
|
481
|
+
'title': ( localizeWithPath(
|
|
482
482
|
'vs/workbench/services/keybinding/browser/keyboardLayoutService',
|
|
483
483
|
'keyboardConfigurationTitle',
|
|
484
484
|
"Keyboard"
|
|
@@ -487,7 +487,7 @@ const keyboardConfiguration = {
|
|
|
487
487
|
'keyboard.layout': {
|
|
488
488
|
'type': 'string',
|
|
489
489
|
'default': 'autodetect',
|
|
490
|
-
'description': (
|
|
490
|
+
'description': ( localizeWithPath(
|
|
491
491
|
'vs/workbench/services/keybinding/browser/keyboardLayoutService',
|
|
492
492
|
'keyboard.layout.config',
|
|
493
493
|
"Control the keyboard layout used in web."
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { KeybindingParser } from '../../../../base/common/keybindingParser.js';
|
|
2
|
-
import { ContextKeyExpr } from '
|
|
2
|
+
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
3
3
|
|
|
4
4
|
class KeybindingIO {
|
|
5
5
|
static writeKeybindingItem(out, item) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isWindows, isLinux } from '
|
|
1
|
+
import { isWindows, isLinux } from 'vscode/vscode/vs/base/common/platform';
|
|
2
2
|
import { getKeyboardLayoutId } from 'vscode/vscode/vs/platform/keyboardLayout/common/keyboardLayout';
|
|
3
3
|
|
|
4
4
|
function deserializeMapping(serializedMapping) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IMMUTABLE_CODE_TO_KEY_CODE, KeyCodeUtils, ScanCodeUtils, IMMUTABLE_KEY_CODE_TO_CODE } from '
|
|
2
|
-
import { ScanCodeChord, KeyCodeChord } from '
|
|
3
|
-
import { BaseResolvedKeybinding } from '
|
|
1
|
+
import { IMMUTABLE_CODE_TO_KEY_CODE, KeyCodeUtils, ScanCodeUtils, IMMUTABLE_KEY_CODE_TO_CODE } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
2
|
+
import { ScanCodeChord, KeyCodeChord } from 'vscode/vscode/vs/base/common/keybindings';
|
|
3
|
+
import { BaseResolvedKeybinding } from 'vscode/vscode/vs/platform/keybinding/common/baseResolvedKeybinding';
|
|
4
4
|
|
|
5
5
|
const CHAR_CODE_TO_KEY_CODE = [];
|
|
6
6
|
class NativeResolvedKeybinding extends BaseResolvedKeybinding {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { KeyCodeUtils, IMMUTABLE_CODE_TO_KEY_CODE, ScanCodeUtils, NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE } from '
|
|
2
|
-
import { ScanCodeChord, KeyCodeChord } from '
|
|
3
|
-
import { UILabelProvider } from '
|
|
4
|
-
import { BaseResolvedKeybinding } from '
|
|
5
|
-
import { toEmptyArrayIfContainsNull } from '
|
|
1
|
+
import { KeyCodeUtils, IMMUTABLE_CODE_TO_KEY_CODE, ScanCodeUtils, NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
2
|
+
import { ScanCodeChord, KeyCodeChord } from 'vscode/vscode/vs/base/common/keybindings';
|
|
3
|
+
import { UILabelProvider } from 'vscode/vscode/vs/base/common/keybindingLabels';
|
|
4
|
+
import { BaseResolvedKeybinding } from 'vscode/vscode/vs/platform/keybinding/common/baseResolvedKeybinding';
|
|
5
|
+
import { toEmptyArrayIfContainsNull } from 'vscode/vscode/vs/platform/keybinding/common/resolvedKeybindingItem';
|
|
6
6
|
|
|
7
7
|
class WindowsNativeResolvedKeybinding extends BaseResolvedKeybinding {
|
|
8
8
|
constructor(mapper, chords) {
|