@codingame/monaco-vscode-keybindings-service-override 20.5.0 → 21.0.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 +8 -8
- package/vscode/src/vs/platform/keyboardLayout/common/keyboardConfig.js +3 -3
- package/vscode/src/vs/workbench/contrib/commands/common/commands.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/keybindings/browser/keybindings.contribution.js +3 -4
- package/vscode/src/vs/workbench/contrib/preferences/browser/keybindingsEditorContribution.js +3 -3
- package/vscode/src/vs/workbench/services/actions/common/menusExtensionPoint.js +147 -147
- package/vscode/src/vs/workbench/services/keybinding/browser/keybindingService.js +24 -24
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayoutService.js +2 -2
|
@@ -50,39 +50,39 @@ import { getAllUnboundCommands } from '@codingame/monaco-vscode-d609a7d3-bf87-55
|
|
|
50
50
|
var WorkbenchKeybindingService_1;
|
|
51
51
|
function isValidContributedKeyBinding(keyBinding, rejects) {
|
|
52
52
|
if (!keyBinding) {
|
|
53
|
-
rejects.push(( localize(
|
|
53
|
+
rejects.push(( localize(13437, "expected non-empty value.")));
|
|
54
54
|
return false;
|
|
55
55
|
}
|
|
56
56
|
if (typeof keyBinding.command !== 'string') {
|
|
57
57
|
rejects.push(( localize(
|
|
58
|
-
|
|
58
|
+
13438,
|
|
59
59
|
"property `{0}` is mandatory and must be of type `string`",
|
|
60
60
|
'command'
|
|
61
61
|
)));
|
|
62
62
|
return false;
|
|
63
63
|
}
|
|
64
64
|
if (keyBinding.key && typeof keyBinding.key !== 'string') {
|
|
65
|
-
rejects.push(( localize(
|
|
65
|
+
rejects.push(( localize(13439, "property `{0}` can be omitted or must be of type `string`", 'key')));
|
|
66
66
|
return false;
|
|
67
67
|
}
|
|
68
68
|
if (keyBinding.when && typeof keyBinding.when !== 'string') {
|
|
69
|
-
rejects.push(( localize(
|
|
69
|
+
rejects.push(( localize(13439, "property `{0}` can be omitted or must be of type `string`", 'when')));
|
|
70
70
|
return false;
|
|
71
71
|
}
|
|
72
72
|
if (keyBinding.mac && typeof keyBinding.mac !== 'string') {
|
|
73
|
-
rejects.push(( localize(
|
|
73
|
+
rejects.push(( localize(13439, "property `{0}` can be omitted or must be of type `string`", 'mac')));
|
|
74
74
|
return false;
|
|
75
75
|
}
|
|
76
76
|
if (keyBinding.linux && typeof keyBinding.linux !== 'string') {
|
|
77
77
|
rejects.push(( localize(
|
|
78
|
-
|
|
78
|
+
13439,
|
|
79
79
|
"property `{0}` can be omitted or must be of type `string`",
|
|
80
80
|
'linux'
|
|
81
81
|
)));
|
|
82
82
|
return false;
|
|
83
83
|
}
|
|
84
84
|
if (keyBinding.win && typeof keyBinding.win !== 'string') {
|
|
85
|
-
rejects.push(( localize(
|
|
85
|
+
rejects.push(( localize(13439, "property `{0}` can be omitted or must be of type `string`", 'win')));
|
|
86
86
|
return false;
|
|
87
87
|
}
|
|
88
88
|
return true;
|
|
@@ -92,33 +92,33 @@ const keybindingType = {
|
|
|
92
92
|
default: { command: '', key: '' },
|
|
93
93
|
properties: {
|
|
94
94
|
command: {
|
|
95
|
-
description: ( localize(
|
|
95
|
+
description: ( localize(13440, 'Identifier of the command to run when keybinding is triggered.')),
|
|
96
96
|
type: 'string'
|
|
97
97
|
},
|
|
98
98
|
args: {
|
|
99
|
-
description: ( localize(
|
|
99
|
+
description: ( localize(13441, "Arguments to pass to the command to execute."))
|
|
100
100
|
},
|
|
101
101
|
key: {
|
|
102
102
|
description: ( localize(
|
|
103
|
-
|
|
103
|
+
13442,
|
|
104
104
|
'Key or key sequence (separate keys with plus-sign and sequences with space, e.g. Ctrl+O and Ctrl+L L for a chord).'
|
|
105
105
|
)),
|
|
106
106
|
type: 'string'
|
|
107
107
|
},
|
|
108
108
|
mac: {
|
|
109
|
-
description: ( localize(
|
|
109
|
+
description: ( localize(13443, 'Mac specific key or key sequence.')),
|
|
110
110
|
type: 'string'
|
|
111
111
|
},
|
|
112
112
|
linux: {
|
|
113
|
-
description: ( localize(
|
|
113
|
+
description: ( localize(13444, 'Linux specific key or key sequence.')),
|
|
114
114
|
type: 'string'
|
|
115
115
|
},
|
|
116
116
|
win: {
|
|
117
|
-
description: ( localize(
|
|
117
|
+
description: ( localize(13445, 'Windows specific key or key sequence.')),
|
|
118
118
|
type: 'string'
|
|
119
119
|
},
|
|
120
120
|
when: {
|
|
121
|
-
description: ( localize(
|
|
121
|
+
description: ( localize(13446, 'Condition when the key is active.')),
|
|
122
122
|
type: 'string'
|
|
123
123
|
},
|
|
124
124
|
}
|
|
@@ -127,7 +127,7 @@ const keybindingsExtPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
|
127
127
|
extensionPoint: 'keybindings',
|
|
128
128
|
deps: [commandsExtensionPoint],
|
|
129
129
|
jsonSchema: {
|
|
130
|
-
description: ( localize(
|
|
130
|
+
description: ( localize(13447, "Contributes keybindings.")),
|
|
131
131
|
oneOf: [
|
|
132
132
|
keybindingType,
|
|
133
133
|
{
|
|
@@ -515,7 +515,7 @@ let WorkbenchKeybindingService = WorkbenchKeybindingService_1 = class WorkbenchK
|
|
|
515
515
|
}
|
|
516
516
|
if (rejects.length > 0) {
|
|
517
517
|
collector.error(( localize(
|
|
518
|
-
|
|
518
|
+
13448,
|
|
519
519
|
"Invalid `contributes.{0}`: {1}",
|
|
520
520
|
keybindingsExtPoint.name,
|
|
521
521
|
rejects.join('\n')
|
|
@@ -603,7 +603,7 @@ let WorkbenchKeybindingService = WorkbenchKeybindingService_1 = class WorkbenchK
|
|
|
603
603
|
static _getAllCommandsAsComment(boundCommands) {
|
|
604
604
|
const unboundCommands = getAllUnboundCommands(boundCommands);
|
|
605
605
|
const pretty = unboundCommands.sort().join('\n// - ');
|
|
606
|
-
return '// ' + ( localize(
|
|
606
|
+
return '// ' + ( localize(13449, "Here are other available commands: ")) + '\n// - ' + pretty;
|
|
607
607
|
}
|
|
608
608
|
mightProducePrintableCharacter(event) {
|
|
609
609
|
if (event.ctrlKey || event.metaKey || event.altKey) {
|
|
@@ -728,7 +728,7 @@ class KeybindingsJsonSchema {
|
|
|
728
728
|
this.schema = {
|
|
729
729
|
id: KeybindingsJsonSchema.schemaId,
|
|
730
730
|
type: 'array',
|
|
731
|
-
title: ( localize(
|
|
731
|
+
title: ( localize(13450, "Keybindings configuration")),
|
|
732
732
|
allowTrailingCommas: true,
|
|
733
733
|
allowComments: true,
|
|
734
734
|
definitions: {
|
|
@@ -752,7 +752,7 @@ class KeybindingsJsonSchema {
|
|
|
752
752
|
'type': 'string',
|
|
753
753
|
'enum': this.commandsEnum,
|
|
754
754
|
'enumDescriptions': this.commandsEnumDescriptions,
|
|
755
|
-
'description': ( localize(
|
|
755
|
+
'description': ( localize(13451, "Name of the command to execute")),
|
|
756
756
|
},
|
|
757
757
|
'commandType': {
|
|
758
758
|
'anyOf': [
|
|
@@ -763,7 +763,7 @@ class KeybindingsJsonSchema {
|
|
|
763
763
|
'type': 'string',
|
|
764
764
|
'enum': this.removalCommandsEnum,
|
|
765
765
|
'enumDescriptions': this.commandsEnumDescriptions,
|
|
766
|
-
'description': ( localize(
|
|
766
|
+
'description': ( localize(13452, "Name of the command to remove keyboard shortcut for")),
|
|
767
767
|
},
|
|
768
768
|
{
|
|
769
769
|
'type': 'string'
|
|
@@ -781,7 +781,7 @@ class KeybindingsJsonSchema {
|
|
|
781
781
|
'properties': {
|
|
782
782
|
'key': {
|
|
783
783
|
'type': 'string',
|
|
784
|
-
'description': ( localize(
|
|
784
|
+
'description': ( localize(13453, "Key or key sequence (separated by space)")),
|
|
785
785
|
},
|
|
786
786
|
'command': {
|
|
787
787
|
'anyOf': [
|
|
@@ -794,7 +794,7 @@ class KeybindingsJsonSchema {
|
|
|
794
794
|
'type': 'array'
|
|
795
795
|
},
|
|
796
796
|
'errorMessage': ( localize(
|
|
797
|
-
|
|
797
|
+
13454,
|
|
798
798
|
"Incorrect type. Expected \"{0}\". The field 'command' does not support running multiple commands. Use command 'runCommands' to pass it multiple commands to run.",
|
|
799
799
|
'string'
|
|
800
800
|
))
|
|
@@ -810,10 +810,10 @@ class KeybindingsJsonSchema {
|
|
|
810
810
|
},
|
|
811
811
|
'when': {
|
|
812
812
|
'type': 'string',
|
|
813
|
-
'description': ( localize(
|
|
813
|
+
'description': ( localize(13455, "Condition when the key is active."))
|
|
814
814
|
},
|
|
815
815
|
'args': {
|
|
816
|
-
'description': ( localize(
|
|
816
|
+
'description': ( localize(13456, "Arguments to pass to the command to execute."))
|
|
817
817
|
}
|
|
818
818
|
},
|
|
819
819
|
'$ref': '#/definitions/commandsSchemas'
|
|
@@ -483,12 +483,12 @@ const keyboardConfiguration = {
|
|
|
483
483
|
'id': 'keyboard',
|
|
484
484
|
'order': 15,
|
|
485
485
|
'type': 'object',
|
|
486
|
-
'title': ( localize(
|
|
486
|
+
'title': ( localize(13457, "Keyboard")),
|
|
487
487
|
'properties': {
|
|
488
488
|
'keyboard.layout': {
|
|
489
489
|
'type': 'string',
|
|
490
490
|
'default': 'autodetect',
|
|
491
|
-
'description': ( localize(
|
|
491
|
+
'description': ( localize(13458, "Control the keyboard layout used in web."))
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
494
|
};
|