@codingame/monaco-vscode-keybindings-service-override 16.1.0 → 17.0.0
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 +10 -10
- package/vscode/src/vs/platform/keyboardLayout/common/keyboardConfig.js +3 -3
- package/vscode/src/vs/workbench/browser/contextkeys.js +6 -6
- package/vscode/src/vs/workbench/contrib/commands/common/commands.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/keybindings/browser/keybindings.contribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/preferences/browser/keybindingsEditorContribution.js +4 -4
- package/vscode/src/vs/workbench/services/actions/common/menusExtensionPoint.js +136 -136
- 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 { ILayoutService } from '@codingame/monaco-vscode-api/vscode/vs/platform/
|
|
|
50
50
|
var WorkbenchKeybindingService_1;
|
|
51
51
|
function isValidContributedKeyBinding(keyBinding, rejects) {
|
|
52
52
|
if (!keyBinding) {
|
|
53
|
-
rejects.push(( localize(
|
|
53
|
+
rejects.push(( localize(12410, "expected non-empty value.")));
|
|
54
54
|
return false;
|
|
55
55
|
}
|
|
56
56
|
if (typeof keyBinding.command !== 'string') {
|
|
57
57
|
rejects.push(( localize(
|
|
58
|
-
|
|
58
|
+
12411,
|
|
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(12412, "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(12412, "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(12412, "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
|
+
12412,
|
|
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(12412, "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(12413, '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(12414, "Arguments to pass to the command to execute."))
|
|
100
100
|
},
|
|
101
101
|
key: {
|
|
102
102
|
description: ( localize(
|
|
103
|
-
|
|
103
|
+
12415,
|
|
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(12416, 'Mac specific key or key sequence.')),
|
|
110
110
|
type: 'string'
|
|
111
111
|
},
|
|
112
112
|
linux: {
|
|
113
|
-
description: ( localize(
|
|
113
|
+
description: ( localize(12417, 'Linux specific key or key sequence.')),
|
|
114
114
|
type: 'string'
|
|
115
115
|
},
|
|
116
116
|
win: {
|
|
117
|
-
description: ( localize(
|
|
117
|
+
description: ( localize(12418, 'Windows specific key or key sequence.')),
|
|
118
118
|
type: 'string'
|
|
119
119
|
},
|
|
120
120
|
when: {
|
|
121
|
-
description: ( localize(
|
|
121
|
+
description: ( localize(12419, '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(12420, "Contributes keybindings.")),
|
|
131
131
|
oneOf: [
|
|
132
132
|
keybindingType,
|
|
133
133
|
{
|
|
@@ -508,7 +508,7 @@ let WorkbenchKeybindingService = WorkbenchKeybindingService_1 = class WorkbenchK
|
|
|
508
508
|
}
|
|
509
509
|
if (rejects.length > 0) {
|
|
510
510
|
collector.error(( localize(
|
|
511
|
-
|
|
511
|
+
12421,
|
|
512
512
|
"Invalid `contributes.{0}`: {1}",
|
|
513
513
|
keybindingsExtPoint.name,
|
|
514
514
|
rejects.join('\n')
|
|
@@ -596,7 +596,7 @@ let WorkbenchKeybindingService = WorkbenchKeybindingService_1 = class WorkbenchK
|
|
|
596
596
|
static _getAllCommandsAsComment(boundCommands) {
|
|
597
597
|
const unboundCommands = getAllUnboundCommands(boundCommands);
|
|
598
598
|
const pretty = unboundCommands.sort().join('\n// - ');
|
|
599
|
-
return '// ' + ( localize(
|
|
599
|
+
return '// ' + ( localize(12422, "Here are other available commands: ")) + '\n// - ' + pretty;
|
|
600
600
|
}
|
|
601
601
|
mightProducePrintableCharacter(event) {
|
|
602
602
|
if (event.ctrlKey || event.metaKey || event.altKey) {
|
|
@@ -722,7 +722,7 @@ class KeybindingsJsonSchema {
|
|
|
722
722
|
this.schema = {
|
|
723
723
|
id: KeybindingsJsonSchema.schemaId,
|
|
724
724
|
type: 'array',
|
|
725
|
-
title: ( localize(
|
|
725
|
+
title: ( localize(12423, "Keybindings configuration")),
|
|
726
726
|
allowTrailingCommas: true,
|
|
727
727
|
allowComments: true,
|
|
728
728
|
definitions: {
|
|
@@ -746,7 +746,7 @@ class KeybindingsJsonSchema {
|
|
|
746
746
|
'type': 'string',
|
|
747
747
|
'enum': this.commandsEnum,
|
|
748
748
|
'enumDescriptions': this.commandsEnumDescriptions,
|
|
749
|
-
'description': ( localize(
|
|
749
|
+
'description': ( localize(12424, "Name of the command to execute")),
|
|
750
750
|
},
|
|
751
751
|
'commandType': {
|
|
752
752
|
'anyOf': [
|
|
@@ -757,7 +757,7 @@ class KeybindingsJsonSchema {
|
|
|
757
757
|
'type': 'string',
|
|
758
758
|
'enum': this.removalCommandsEnum,
|
|
759
759
|
'enumDescriptions': this.commandsEnumDescriptions,
|
|
760
|
-
'description': ( localize(
|
|
760
|
+
'description': ( localize(12425, "Name of the command to remove keyboard shortcut for")),
|
|
761
761
|
},
|
|
762
762
|
{
|
|
763
763
|
'type': 'string'
|
|
@@ -775,7 +775,7 @@ class KeybindingsJsonSchema {
|
|
|
775
775
|
'properties': {
|
|
776
776
|
'key': {
|
|
777
777
|
'type': 'string',
|
|
778
|
-
'description': ( localize(
|
|
778
|
+
'description': ( localize(12426, "Key or key sequence (separated by space)")),
|
|
779
779
|
},
|
|
780
780
|
'command': {
|
|
781
781
|
'anyOf': [
|
|
@@ -788,7 +788,7 @@ class KeybindingsJsonSchema {
|
|
|
788
788
|
'type': 'array'
|
|
789
789
|
},
|
|
790
790
|
'errorMessage': ( localize(
|
|
791
|
-
|
|
791
|
+
12427,
|
|
792
792
|
"Incorrect type. Expected \"{0}\". The field 'command' does not support running multiple commands. Use command 'runCommands' to pass it multiple commands to run.",
|
|
793
793
|
'string'
|
|
794
794
|
))
|
|
@@ -804,10 +804,10 @@ class KeybindingsJsonSchema {
|
|
|
804
804
|
},
|
|
805
805
|
'when': {
|
|
806
806
|
'type': 'string',
|
|
807
|
-
'description': ( localize(
|
|
807
|
+
'description': ( localize(12428, "Condition when the key is active."))
|
|
808
808
|
},
|
|
809
809
|
'args': {
|
|
810
|
-
'description': ( localize(
|
|
810
|
+
'description': ( localize(12429, "Arguments to pass to the command to execute."))
|
|
811
811
|
}
|
|
812
812
|
},
|
|
813
813
|
'$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(12430, "Keyboard")),
|
|
487
487
|
'properties': {
|
|
488
488
|
'keyboard.layout': {
|
|
489
489
|
'type': 'string',
|
|
490
490
|
'default': 'autodetect',
|
|
491
|
-
'description': ( localize(
|
|
491
|
+
'description': ( localize(12431, "Control the keyboard layout used in web."))
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
494
|
};
|