@codingame/monaco-vscode-keybindings-service-override 7.1.0 → 7.1.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/package.json +3 -3
- package/vscode/src/vs/platform/keyboardLayout/common/keyboardConfig.js +5 -11
- package/vscode/src/vs/workbench/browser/contextkeys.js +10 -10
- package/vscode/src/vs/workbench/contrib/commands/common/commands.contribution.js +8 -11
- package/vscode/src/vs/workbench/contrib/keybindings/browser/keybindings.contribution.js +2 -3
- package/vscode/src/vs/workbench/contrib/preferences/browser/keybindingsEditorContribution.js +6 -9
- package/vscode/src/vs/workbench/services/actions/common/menusExtensionPoint.js +183 -257
- package/vscode/src/vs/workbench/services/keybinding/browser/keybindingService.js +29 -63
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayoutService.js +3 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-keybindings-service-override",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.1",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@7.1.
|
|
30
|
-
"@codingame/monaco-vscode-files-service-override": "7.1.
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@7.1.1",
|
|
30
|
+
"@codingame/monaco-vscode-files-service-override": "7.1.1"
|
|
31
31
|
}
|
|
32
32
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { localize } from 'vscode/vscode/vs/nls';
|
|
2
2
|
import { OS, OperatingSystem } from 'vscode/vscode/vs/base/common/platform';
|
|
3
3
|
import { Extensions, ConfigurationScope } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
4
4
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
5
5
|
|
|
6
|
-
const _moduleId = "vs/platform/keyboardLayout/common/keyboardConfig";
|
|
7
6
|
var DispatchConfig;
|
|
8
7
|
( ((function(DispatchConfig) {
|
|
9
8
|
DispatchConfig[DispatchConfig["Code"] = 0] = "Code";
|
|
@@ -20,16 +19,15 @@ const keyboardConfiguration = {
|
|
|
20
19
|
'id': 'keyboard',
|
|
21
20
|
'order': 15,
|
|
22
21
|
'type': 'object',
|
|
23
|
-
'title': (
|
|
22
|
+
'title': ( localize(8664, "Keyboard")),
|
|
24
23
|
'properties': {
|
|
25
24
|
'keyboard.dispatch': {
|
|
26
25
|
scope: ConfigurationScope.APPLICATION,
|
|
27
26
|
type: 'string',
|
|
28
27
|
enum: ['code', 'keyCode'],
|
|
29
28
|
default: 'code',
|
|
30
|
-
markdownDescription: (
|
|
31
|
-
|
|
32
|
-
1,
|
|
29
|
+
markdownDescription: ( localize(
|
|
30
|
+
8665,
|
|
33
31
|
"Controls the dispatching logic for key presses to use either `code` (recommended) or `keyCode`."
|
|
34
32
|
)),
|
|
35
33
|
included: OS === OperatingSystem.Macintosh || OS === OperatingSystem.Linux
|
|
@@ -38,11 +36,7 @@ const keyboardConfiguration = {
|
|
|
38
36
|
scope: ConfigurationScope.APPLICATION,
|
|
39
37
|
type: 'boolean',
|
|
40
38
|
default: false,
|
|
41
|
-
markdownDescription: (
|
|
42
|
-
_moduleId,
|
|
43
|
-
2,
|
|
44
|
-
"Controls if the AltGraph+ modifier should be treated as Ctrl+Alt+."
|
|
45
|
-
)),
|
|
39
|
+
markdownDescription: ( localize(8666, "Controls if the AltGraph+ modifier should be treated as Ctrl+Alt+.")),
|
|
46
40
|
included: OS === OperatingSystem.Windows
|
|
47
41
|
}
|
|
48
42
|
}
|
|
@@ -102,16 +102,15 @@ let WorkbenchContextKeysHandler = class WorkbenchContextKeysHandler extends Disp
|
|
|
102
102
|
registerListeners() {
|
|
103
103
|
this.editorGroupService.whenReady.then(() => {
|
|
104
104
|
this.updateEditorAreaContextKeys();
|
|
105
|
-
this.
|
|
105
|
+
this.updateActiveEditorGroupContextKeys();
|
|
106
106
|
this.updateVisiblePanesContextKeys();
|
|
107
107
|
});
|
|
108
|
-
this._register(this.editorService.onDidActiveEditorChange(() => this.
|
|
108
|
+
this._register(this.editorService.onDidActiveEditorChange(() => this.updateActiveEditorGroupContextKeys()));
|
|
109
109
|
this._register(this.editorService.onDidVisibleEditorsChange(() => this.updateVisiblePanesContextKeys()));
|
|
110
|
-
this._register(this.editorGroupService.onDidAddGroup(() => this.
|
|
111
|
-
this._register(this.editorGroupService.onDidRemoveGroup(() => this.
|
|
112
|
-
this._register(this.editorGroupService.onDidChangeGroupIndex(() => this.
|
|
113
|
-
this._register(this.editorGroupService.
|
|
114
|
-
this._register(this.editorGroupService.onDidChangeGroupLocked(() => this.updateEditorGroupsContextKeys()));
|
|
110
|
+
this._register(this.editorGroupService.onDidAddGroup(() => this.updateEditorGroupsContextKeys()));
|
|
111
|
+
this._register(this.editorGroupService.onDidRemoveGroup(() => this.updateEditorGroupsContextKeys()));
|
|
112
|
+
this._register(this.editorGroupService.onDidChangeGroupIndex(() => this.updateActiveEditorGroupContextKeys()));
|
|
113
|
+
this._register(this.editorGroupService.onDidChangeGroupLocked(() => this.updateActiveEditorGroupContextKeys()));
|
|
115
114
|
this._register(this.editorGroupService.onDidChangeEditorPartOptions(() => this.updateEditorAreaContextKeys()));
|
|
116
115
|
this._register(Event.runAndSubscribe(onDidRegisterWindow, ({ window, disposables }) => disposables.add(addDisposableListener(window, EventType.FOCUS_IN, () => this.updateInputContextKeys(window.document), true)), { window: mainWindow, disposables: this._store }));
|
|
117
116
|
this._register(this.contextService.onDidChangeWorkbenchState(() => this.updateWorkbenchStateContextKey()));
|
|
@@ -154,13 +153,16 @@ let WorkbenchContextKeysHandler = class WorkbenchContextKeysHandler extends Disp
|
|
|
154
153
|
this.editorsVisibleContext.reset();
|
|
155
154
|
}
|
|
156
155
|
}
|
|
157
|
-
|
|
156
|
+
updateActiveEditorGroupContextKeys() {
|
|
158
157
|
if (!this.editorService.activeEditor) {
|
|
159
158
|
this.activeEditorGroupEmpty.set(true);
|
|
160
159
|
}
|
|
161
160
|
else {
|
|
162
161
|
this.activeEditorGroupEmpty.reset();
|
|
163
162
|
}
|
|
163
|
+
const activeGroup = this.editorGroupService.activeGroup;
|
|
164
|
+
this.activeEditorGroupIndex.set(activeGroup.index + 1);
|
|
165
|
+
this.activeEditorGroupLocked.set(activeGroup.isLocked);
|
|
164
166
|
this.updateEditorGroupsContextKeys();
|
|
165
167
|
}
|
|
166
168
|
updateEditorGroupsContextKeys() {
|
|
@@ -172,9 +174,7 @@ let WorkbenchContextKeysHandler = class WorkbenchContextKeysHandler extends Disp
|
|
|
172
174
|
this.multipleEditorGroupsContext.reset();
|
|
173
175
|
}
|
|
174
176
|
const activeGroup = this.editorGroupService.activeGroup;
|
|
175
|
-
this.activeEditorGroupIndex.set(activeGroup.index + 1);
|
|
176
177
|
this.activeEditorGroupLast.set(activeGroup.index === groupCount - 1);
|
|
177
|
-
this.activeEditorGroupLocked.set(activeGroup.isLocked);
|
|
178
178
|
}
|
|
179
179
|
updateEditorAreaContextKeys() {
|
|
180
180
|
this.editorTabsVisibleContext.set(this.editorGroupService.partOptions.showTabs === 'multiple');
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import { safeStringify } from 'vscode/vscode/vs/base/common/objects';
|
|
2
|
-
import {
|
|
2
|
+
import { localize2, localize } from 'vscode/vscode/vs/nls';
|
|
3
3
|
import { Action2, registerAction2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
4
4
|
import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
|
|
5
5
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
6
6
|
import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
|
|
7
7
|
|
|
8
|
-
const _moduleId = "vs/workbench/contrib/commands/common/commands.contribution";
|
|
9
8
|
class RunCommands extends Action2 {
|
|
10
9
|
constructor() {
|
|
11
10
|
super({
|
|
12
11
|
id: 'runCommands',
|
|
13
|
-
title: (
|
|
12
|
+
title: ( localize2(3529, "Run Commands")),
|
|
14
13
|
f1: false,
|
|
15
14
|
metadata: {
|
|
16
|
-
description: (
|
|
15
|
+
description: ( localize(3530, "Run several commands")),
|
|
17
16
|
args: [
|
|
18
17
|
{
|
|
19
18
|
name: 'args',
|
|
@@ -23,7 +22,7 @@ class RunCommands extends Action2 {
|
|
|
23
22
|
properties: {
|
|
24
23
|
commands: {
|
|
25
24
|
type: 'array',
|
|
26
|
-
description: (
|
|
25
|
+
description: ( localize(3531, "Commands to run")),
|
|
27
26
|
items: {
|
|
28
27
|
anyOf: [
|
|
29
28
|
{
|
|
@@ -62,17 +61,15 @@ class RunCommands extends Action2 {
|
|
|
62
61
|
async run(accessor, args) {
|
|
63
62
|
const notificationService = accessor.get(INotificationService);
|
|
64
63
|
if (!this._isCommandArgs(args)) {
|
|
65
|
-
notificationService.error((
|
|
66
|
-
|
|
67
|
-
3,
|
|
64
|
+
notificationService.error(( localize(
|
|
65
|
+
3532,
|
|
68
66
|
"'runCommands' has received an argument with incorrect type. Please, review the argument passed to the command."
|
|
69
67
|
)));
|
|
70
68
|
return;
|
|
71
69
|
}
|
|
72
70
|
if (args.commands.length === 0) {
|
|
73
|
-
notificationService.warn((
|
|
74
|
-
|
|
75
|
-
4,
|
|
71
|
+
notificationService.warn(( localize(
|
|
72
|
+
3533,
|
|
76
73
|
"'runCommands' has not received commands to run. Did you forget to pass commands in the 'runCommands' argument?"
|
|
77
74
|
)));
|
|
78
75
|
return;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { localize2 } from 'vscode/vscode/vs/nls';
|
|
2
2
|
import { Action2, registerAction2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
3
3
|
import { IKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
4
4
|
import { Categories } from 'vscode/vscode/vs/platform/action/common/actionCommonCategories';
|
|
5
5
|
import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
|
|
6
6
|
import { showWindowLogActionId } from 'vscode/vscode/vs/workbench/services/log/common/logConstants';
|
|
7
7
|
|
|
8
|
-
const _moduleId = "vs/workbench/contrib/keybindings/browser/keybindings.contribution";
|
|
9
8
|
class ToggleKeybindingsLogAction extends Action2 {
|
|
10
9
|
constructor() {
|
|
11
10
|
super({
|
|
12
11
|
id: 'workbench.action.toggleKeybindingsLog',
|
|
13
|
-
title: (
|
|
12
|
+
title: ( localize2(3525, "Toggle Keyboard Shortcuts Troubleshooting")),
|
|
14
13
|
category: Categories.Developer,
|
|
15
14
|
f1: true
|
|
16
15
|
});
|
package/vscode/src/vs/workbench/contrib/preferences/browser/keybindingsEditorContribution.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
|
-
import {
|
|
2
|
+
import { localize } from 'vscode/vscode/vs/nls';
|
|
3
3
|
import { RunOnceScheduler } from 'vscode/vscode/vs/base/common/async';
|
|
4
4
|
import { MarkdownString } from 'vscode/vscode/vs/base/common/htmlContent';
|
|
5
5
|
import { Disposable, MutableDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
@@ -22,10 +22,8 @@ import { IUserDataProfileService } from 'vscode/vscode/vs/workbench/services/use
|
|
|
22
22
|
import { DEFINE_KEYBINDING_EDITOR_CONTRIB_ID } from 'vscode/vscode/vs/workbench/services/preferences/common/preferences';
|
|
23
23
|
|
|
24
24
|
var KeybindingEditorDecorationsRenderer_1;
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
_moduleId,
|
|
28
|
-
0,
|
|
25
|
+
const NLS_KB_LAYOUT_ERROR_MESSAGE = ( localize(
|
|
26
|
+
3526,
|
|
29
27
|
"You won't be able to produce this key combination under your current keyboard layout."
|
|
30
28
|
));
|
|
31
29
|
let DefineKeybindingEditorContribution = class DefineKeybindingEditorContribution extends Disposable {
|
|
@@ -182,16 +180,15 @@ let KeybindingEditorDecorationsRenderer = KeybindingEditorDecorationsRenderer_1
|
|
|
182
180
|
}
|
|
183
181
|
else {
|
|
184
182
|
if (usLabel && uiLabel !== usLabel) {
|
|
185
|
-
msg = ( (new MarkdownString((
|
|
186
|
-
|
|
187
|
-
1,
|
|
183
|
+
msg = ( (new MarkdownString(( localize(
|
|
184
|
+
3527,
|
|
188
185
|
"**{0}** for your current keyboard layout (**{1}** for US standard).",
|
|
189
186
|
uiLabel,
|
|
190
187
|
usLabel
|
|
191
188
|
)))));
|
|
192
189
|
}
|
|
193
190
|
else {
|
|
194
|
-
msg = ( (new MarkdownString((
|
|
191
|
+
msg = ( (new MarkdownString(( localize(3528, "**{0}** for your current keyboard layout.", uiLabel)))));
|
|
195
192
|
}
|
|
196
193
|
className = 'keybindingInfo';
|
|
197
194
|
overviewRulerColor = themeColorFromId(overviewRulerInfo);
|