@codingame/monaco-vscode-api 1.83.1 → 1.83.3-next.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/extensions.d.ts +3 -3
- package/extensions.js +31 -33
- package/l10n.d.ts +4 -0
- package/l10n.js +10 -0
- package/missing-services.js +4 -2
- package/monaco-editor-treemending.patch +12268 -1070
- package/monaco-treemending.js +8 -2
- package/package.json +8 -1
- package/service-override/extensions.js +2 -2
- package/service-override/layout.js +2 -2
- package/tools/l10n.js +177 -0
- package/tools.js +22 -1
- package/vscode/src/vs/base/browser/ui/menu/menubar.js +1 -1
- package/vscode/src/vs/base/browser/ui/splitview/paneview.js +2 -2
- package/vscode/src/vs/base/common/date.js +55 -55
- package/vscode/src/vs/base/common/jsonErrorMessages.js +10 -10
- package/vscode/src/vs/base/common/tfIdf.js +137 -0
- package/vscode/src/vs/editor/contrib/quickAccess/browser/commandsQuickAccess.js +23 -0
- package/vscode/src/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js +115 -0
- package/vscode/src/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +112 -0
- package/vscode/src/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +334 -0
- package/vscode/src/vs/platform/dialogs/common/dialogs.js +10 -14
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +3 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionNls.js +2 -2
- package/vscode/src/vs/platform/files/common/fileService.js +28 -37
- package/vscode/src/vs/platform/files/common/files.js +6 -6
- package/vscode/src/vs/platform/files/common/io.js +2 -2
- package/vscode/src/vs/platform/keyboardLayout/common/keyboardConfig.js +3 -9
- package/vscode/src/vs/platform/quickinput/browser/commandsQuickAccess.js +300 -0
- package/vscode/src/vs/platform/quickinput/browser/helpQuickAccess.js +59 -0
- package/vscode/src/vs/platform/quickinput/browser/pickerQuickAccess.js +212 -0
- package/vscode/src/vs/platform/request/common/request.js +2 -2
- package/vscode/src/vs/platform/theme/common/tokenClassificationRegistry.js +42 -63
- package/vscode/src/vs/platform/workspaces/common/workspaces.js +15 -15
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +13 -32
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +50 -52
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +58 -69
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +4 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +38 -50
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystem.js +23 -23
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +21 -53
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +4 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +4 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +6 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +4 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +2 -12
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +15 -9
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +16 -20
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +6 -28
- package/vscode/src/vs/workbench/api/browser/statusBarExtensionPoint.js +60 -0
- package/vscode/src/vs/workbench/api/common/extHostChat.js +3 -3
- package/vscode/src/vs/workbench/api/common/extHostCommands.js +59 -65
- package/vscode/src/vs/workbench/api/common/extHostConsoleForwarder.js +8 -8
- package/vscode/src/vs/workbench/api/common/extHostDiagnostics.js +2 -6
- package/vscode/src/vs/workbench/api/common/extHostExtensionService.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +150 -222
- package/vscode/src/vs/workbench/api/common/extHostLogService.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostNotebook.js +3 -3
- package/vscode/src/vs/workbench/api/common/extHostProgress.js +2 -6
- package/vscode/src/vs/workbench/api/common/extHostSCM.js +54 -58
- package/vscode/src/vs/workbench/api/common/extHostStatusBar.js +3 -7
- package/vscode/src/vs/workbench/api/common/extHostTelemetry.js +2 -6
- package/vscode/src/vs/workbench/api/common/extHostTerminalService.js +2 -6
- package/vscode/src/vs/workbench/api/common/extHostTreeViews.js +55 -57
- package/vscode/src/vs/workbench/api/common/extHostTunnelService.js +28 -28
- package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +265 -277
- package/vscode/src/vs/workbench/api/common/extHostWorkspace.js +2 -7
- package/vscode/src/vs/workbench/api/common/extensionHostMain.js +17 -19
- package/vscode/src/vs/workbench/api/common/jsonValidationExtensionPoint.js +9 -34
- package/vscode/src/vs/workbench/api/worker/extHostExtensionService.js +5 -5
- package/vscode/src/vs/workbench/browser/actions/layoutActions.js +898 -68
- package/vscode/src/vs/workbench/browser/actions/quickAccessActions.js +7 -7
- package/vscode/src/vs/workbench/browser/actions/windowActions.js +32 -38
- package/vscode/src/vs/workbench/browser/actions/workspaceActions.js +103 -13
- package/vscode/src/vs/workbench/browser/actions/workspaceCommands.js +2 -2
- package/vscode/src/vs/workbench/browser/editor.js +3 -3
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarActions.js +12 -27
- package/vscode/src/vs/workbench/browser/parts/compositeBarActions.js +12 -12
- package/vscode/src/vs/workbench/browser/parts/editor/binaryDiffEditor.js +2 -7
- package/vscode/src/vs/workbench/browser/parts/editor/binaryEditor.js +4 -7
- package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbs.js +42 -90
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +140 -272
- package/vscode/src/vs/workbench/browser/parts/editor/editorActions.js +115 -148
- package/vscode/src/vs/workbench/browser/parts/editor/editorCommands.js +21 -33
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +7 -19
- package/vscode/src/vs/workbench/browser/parts/editor/editorPlaceholder.js +10 -26
- package/vscode/src/vs/workbench/browser/parts/editor/editorQuickAccess.js +7 -17
- package/vscode/src/vs/workbench/browser/parts/editor/editorStatus.js +60 -81
- package/vscode/src/vs/workbench/browser/parts/editor/sideBySideEditor.js +27 -33
- package/vscode/src/vs/workbench/browser/parts/editor/textCodeEditor.js +2 -2
- package/vscode/src/vs/workbench/browser/parts/editor/textDiffEditor.js +19 -32
- package/vscode/src/vs/workbench/browser/parts/editor/textEditor.js +2 -2
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsCommands.js +8 -8
- package/vscode/src/vs/workbench/browser/parts/panel/panelActions.js +69 -34
- package/vscode/src/vs/workbench/browser/parts/titlebar/menubarControl.js +58 -34
- package/vscode/src/vs/workbench/browser/parts/views/viewFilter.js +2 -2
- package/vscode/src/vs/workbench/browser/parts/views/viewPane.js +3 -9
- package/vscode/src/vs/workbench/browser/parts/views/viewPaneContainer.js +6 -6
- package/vscode/src/vs/workbench/browser/parts/views/viewsService.js +7 -11
- package/vscode/src/vs/workbench/browser/quickaccess.js +7 -3
- package/vscode/src/vs/workbench/browser/workbench.contribution.js +186 -683
- package/vscode/src/vs/workbench/common/configuration.js +12 -15
- package/vscode/src/vs/workbench/common/contextkeys.js +272 -90
- package/vscode/src/vs/workbench/common/editor/diffEditorInput.js +2 -2
- package/vscode/src/vs/workbench/common/editor/sideBySideEditorInput.js +2 -7
- package/vscode/src/vs/workbench/common/editor/textEditorModel.js +2 -6
- package/vscode/src/vs/workbench/common/editor.js +5 -5
- package/vscode/src/vs/workbench/common/theme.js +137 -527
- package/vscode/src/vs/workbench/common/views.js +4 -8
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +15 -55
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityContributions.js +3 -8
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleView.js +22 -60
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleViewActions.js +9 -15
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/bulkEditService.js +18 -48
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/bulkFileEdits.js +58 -74
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +2 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.js +5 -10
- package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.js +5 -13
- package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.js +8 -27
- package/vscode/src/vs/workbench/contrib/codeActions/common/codeActionsExtensionPoint.js +5 -17
- package/vscode/src/vs/workbench/contrib/codeActions/common/documentationExtensionPoint.js +6 -15
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +7 -20
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/languageConfigurationExtensionPoint.js +63 -216
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/largeFileOptimizations.js +4 -7
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess.js +5 -8
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.js +8 -11
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.js +5 -15
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMinimap.js +3 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.js +5 -5
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter.js +3 -6
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace.js +3 -6
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js +10 -9
- package/vscode/src/vs/workbench/contrib/comments/browser/commentColors.js +6 -15
- package/vscode/src/vs/workbench/contrib/comments/browser/commentGlyphWidget.js +5 -20
- package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +3 -10
- package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +4 -4
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +3 -20
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadHeader.js +9 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +4 -13
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.js +19 -19
- package/vscode/src/vs/workbench/contrib/comments/browser/comments.contribution.js +26 -77
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsController.js +5 -17
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.js +31 -40
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsView.js +10 -29
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsViewActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/comments/browser/reactionsAction.js +8 -8
- package/vscode/src/vs/workbench/contrib/comments/common/commentContextKeys.js +25 -21
- package/vscode/src/vs/workbench/contrib/comments/common/commentModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +1 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/debugColors.js +20 -20
- package/vscode/src/vs/workbench/contrib/debug/browser/debugIcons.js +56 -98
- package/vscode/src/vs/workbench/contrib/debug/common/abstractDebugAdapter.js +2 -2
- package/vscode/src/vs/workbench/contrib/debug/common/debug.js +96 -180
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsIcons.js +25 -79
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/configuration.js +4 -15
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService.js +4 -8
- package/vscode/src/vs/workbench/contrib/files/browser/explorerViewlet.js +56 -19
- package/vscode/src/vs/workbench/contrib/files/browser/fileActions.js +76 -230
- package/vscode/src/vs/workbench/contrib/files/browser/fileConstants.js +6 -5
- package/vscode/src/vs/workbench/contrib/files/browser/fileImportExport.js +33 -103
- package/vscode/src/vs/workbench/contrib/files/browser/files.contribution.js +228 -99
- package/vscode/src/vs/workbench/contrib/files/browser/views/emptyView.js +1 -1
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerDecorationsProvider.js +5 -9
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerView.js +5 -5
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerViewer.js +15 -35
- package/vscode/src/vs/workbench/contrib/files/browser/views/openEditorsView.js +5 -8
- package/vscode/src/vs/workbench/contrib/files/common/files.js +27 -48
- package/vscode/src/vs/workbench/contrib/folding/browser/folding.contribution.js +3 -6
- package/vscode/src/vs/workbench/contrib/format/browser/formatModified.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlayHints/browser/inlayHintsAccessibilty.js +5 -8
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +112 -52
- package/vscode/src/vs/workbench/contrib/keybindings/browser/keybindings.contribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +30 -96
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mapping.js +73 -126
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +3 -3
- package/vscode/src/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +42 -0
- package/vscode/src/vs/workbench/contrib/output/browser/output.contribution.js +23 -29
- package/vscode/src/vs/workbench/contrib/output/browser/outputView.js +3 -3
- package/vscode/src/vs/workbench/contrib/quickaccess/browser/commandsQuickAccess.js +13 -16
- package/vscode/src/vs/workbench/contrib/quickaccess/browser/quickAccess.contribution.js +15 -34
- package/vscode/src/vs/workbench/contrib/quickaccess/browser/viewQuickAccess.js +12 -17
- package/vscode/src/vs/workbench/contrib/scm/browser/dirtyDiffSwitcher.js +2 -2
- package/vscode/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.js +26 -75
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetCompletionProvider.js +4 -19
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsFile.js +4 -4
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsService.js +60 -99
- package/vscode/src/vs/workbench/contrib/tasks/common/taskDefinitionRegistry.js +5 -14
- package/vscode/src/vs/workbench/contrib/tasks/common/taskService.js +26 -13
- package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +88 -96
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEditorInput.js +5 -17
- package/vscode/src/vs/workbench/contrib/terminal/common/terminal.js +7 -28
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +21 -78
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalContextKey.js +21 -53
- package/vscode/src/vs/workbench/contrib/testing/common/testResult.js +2 -2
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditor.js +2 -5
- package/vscode/src/vs/workbench/services/actions/common/menusExtensionPoint.js +113 -348
- package/vscode/src/vs/workbench/services/assignment/common/assignmentService.js +2 -5
- package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +31 -1
- package/vscode/src/vs/workbench/services/configuration/common/jsonEditingService.js +1 -4
- package/vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.js +16 -16
- package/vscode/src/vs/workbench/services/decorations/browser/decorationsService.js +2 -2
- package/vscode/src/vs/workbench/services/editor/common/editorResolverService.js +2 -5
- package/vscode/src/vs/workbench/services/extensions/browser/extensionUrlHandler.js +4 -4
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.js +27 -29
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +104 -141
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +35 -39
- package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.js +25 -25
- package/vscode/src/vs/workbench/services/extensions/common/extensionsRegistry.js +80 -296
- package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js +6 -21
- package/vscode/src/vs/workbench/services/host/browser/browserHostService.js +3 -6
- package/vscode/src/vs/workbench/services/keybinding/browser/keybindingService.js +24 -81
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayoutService.js +2 -2
- package/vscode/src/vs/workbench/services/keybinding/common/keybindingEditing.js +11 -17
- package/vscode/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.js +30 -32
- package/vscode/src/vs/workbench/services/language/common/languageService.js +23 -98
- package/vscode/src/vs/workbench/services/remote/common/tunnelModel.js +83 -95
- package/vscode/src/vs/workbench/services/search/common/queryBuilder.js +1 -5
- package/vscode/src/vs/workbench/services/textfile/browser/textFileService.js +11 -23
- package/vscode/src/vs/workbench/services/textfile/common/textFileEditorModel.js +32 -32
- package/vscode/src/vs/workbench/services/textfile/common/textFileEditorModelManager.js +2 -7
- package/vscode/src/vs/workbench/services/textfile/common/textFileSaveParticipant.js +2 -2
- package/vscode/src/vs/workbench/services/themes/common/colorExtensionPoint.js +16 -53
- package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +50 -1
- package/vscode/src/vs/workbench/services/themes/common/tokenClassificationExtensionPoint.js +25 -99
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.js +16 -16
- package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfile.js +6 -3
- package/vscode/src/vs/workbench/services/userDataSync/common/userDataSync.js +15 -3
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopySaveParticipant.js +2 -2
- package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyBackupService.js +32 -42
package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import {
|
|
2
|
+
import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
|
|
3
3
|
import { createDecorator } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
4
4
|
import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
5
5
|
import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
@@ -21,26 +21,11 @@ let FilesConfigurationService = class FilesConfigurationService extends Disposab
|
|
|
21
21
|
static { FilesConfigurationService_1 = this; }
|
|
22
22
|
static { this.DEFAULT_AUTO_SAVE_MODE = isWeb ? AutoSaveConfiguration.AFTER_DELAY : AutoSaveConfiguration.OFF; }
|
|
23
23
|
static { this.READONLY_MESSAGES = {
|
|
24
|
-
providerReadonly: { value: (
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
)), isTrusted: true },
|
|
28
|
-
|
|
29
|
-
{ key: 'sessionReadonly', comment: ['Please do not translate the word "command", it is part of our internal syntax which must not change', '{Locked="](command:{0})"}'] },
|
|
30
|
-
"Editor is read-only because the file was set read-only in this session. [Click here](command:{0}) to set writeable.",
|
|
31
|
-
'workbench.action.files.setActiveEditorWriteableInSession'
|
|
32
|
-
)), isTrusted: true },
|
|
33
|
-
configuredReadonly: { value: ( localize(
|
|
34
|
-
{ key: 'configuredReadonly', comment: ['Please do not translate the word "command", it is part of our internal syntax which must not change', '{Locked="](command:{0})"}'] },
|
|
35
|
-
"Editor is read-only because the file was set read-only via settings. [Click here](command:{0}) to configure.",
|
|
36
|
-
`workbench.action.openSettings?${encodeURIComponent('["files.readonly"]')}`
|
|
37
|
-
)), isTrusted: true },
|
|
38
|
-
fileLocked: { value: ( localize(
|
|
39
|
-
{ key: 'fileLocked', comment: ['Please do not translate the word "command", it is part of our internal syntax which must not change', '{Locked="](command:{0})"}'] },
|
|
40
|
-
"Editor is read-only because of file permissions. [Click here](command:{0}) to set writeable anyway.",
|
|
41
|
-
'workbench.action.files.setActiveEditorWriteableInSession'
|
|
42
|
-
)), isTrusted: true },
|
|
43
|
-
fileReadonly: { value: ( localize('fileReadonly', "Editor is read-only because the file is read-only.")), isTrusted: true }
|
|
24
|
+
providerReadonly: { value: localizeWithPath('vs/workbench/services/filesConfiguration/common/filesConfigurationService', 'providerReadonly', "Editor is read-only because the file system of the file is read-only."), isTrusted: true },
|
|
25
|
+
sessionReadonly: { value: localizeWithPath('vs/workbench/services/filesConfiguration/common/filesConfigurationService', { key: 'sessionReadonly', comment: ['Please do not translate the word "command", it is part of our internal syntax which must not change', '{Locked="](command:{0})"}'] }, "Editor is read-only because the file was set read-only in this session. [Click here](command:{0}) to set writeable.", 'workbench.action.files.setActiveEditorWriteableInSession'), isTrusted: true },
|
|
26
|
+
configuredReadonly: { value: localizeWithPath('vs/workbench/services/filesConfiguration/common/filesConfigurationService', { key: 'configuredReadonly', comment: ['Please do not translate the word "command", it is part of our internal syntax which must not change', '{Locked="](command:{0})"}'] }, "Editor is read-only because the file was set read-only via settings. [Click here](command:{0}) to configure.", `workbench.action.openSettings?${encodeURIComponent('["files.readonly"]')}`), isTrusted: true },
|
|
27
|
+
fileLocked: { value: localizeWithPath('vs/workbench/services/filesConfiguration/common/filesConfigurationService', { key: 'fileLocked', comment: ['Please do not translate the word "command", it is part of our internal syntax which must not change', '{Locked="](command:{0})"}'] }, "Editor is read-only because of file permissions. [Click here](command:{0}) to set writeable anyway.", 'workbench.action.files.setActiveEditorWriteableInSession'), isTrusted: true },
|
|
28
|
+
fileReadonly: { value: localizeWithPath('vs/workbench/services/filesConfiguration/common/filesConfigurationService', 'fileReadonly', "Editor is read-only because the file is read-only."), isTrusted: true }
|
|
44
29
|
}; }
|
|
45
30
|
constructor(contextKeyService, configurationService, contextService, environmentService, uriIdentityService, fileService) {
|
|
46
31
|
super();
|
|
@@ -18,7 +18,7 @@ import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiati
|
|
|
18
18
|
import { ILifecycleService } from '../../lifecycle/common/lifecycle.js';
|
|
19
19
|
import { ILogService } from 'monaco-editor/esm/vs/platform/log/common/log.js';
|
|
20
20
|
import { getWorkspaceIdentifier } from '../../workspaces/browser/workspaces.js';
|
|
21
|
-
import {
|
|
21
|
+
import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
|
|
22
22
|
import Severity from 'monaco-editor/esm/vs/base/common/severity.js';
|
|
23
23
|
import '../../../../../../../override/vs/platform/dialogs/common/dialogs.js';
|
|
24
24
|
import { DomEmitter } from 'monaco-editor/esm/vs/base/browser/event.js';
|
|
@@ -282,11 +282,8 @@ let BrowserHostService = class BrowserHostService extends Disposable {
|
|
|
282
282
|
if (!opened) {
|
|
283
283
|
const { confirmed } = await this.dialogService.confirm({
|
|
284
284
|
type: Severity.Warning,
|
|
285
|
-
message: (
|
|
286
|
-
|
|
287
|
-
"The browser interrupted the opening of a new tab or window. Press 'Open' to open it anyway."
|
|
288
|
-
)),
|
|
289
|
-
primaryButton: ( localize({ key: 'open', comment: ['&& denotes a mnemonic'] }, "&&Open"))
|
|
285
|
+
message: localizeWithPath('vs/workbench/services/host/browser/browserHostService', 'unableToOpenExternal', "The browser interrupted the opening of a new tab or window. Press 'Open' to open it anyway."),
|
|
286
|
+
primaryButton: localizeWithPath('vs/workbench/services/host/browser/browserHostService', { key: 'open', comment: ['&& denotes a mnemonic'] }, "&&Open")
|
|
290
287
|
});
|
|
291
288
|
if (confirmed) {
|
|
292
289
|
await this.workspaceProvider.open(workspace, options);
|
|
@@ -40,55 +40,31 @@ import { IUriIdentityService } from 'monaco-editor/esm/vs/platform/uriIdentity/c
|
|
|
40
40
|
var WorkbenchKeybindingService_1;
|
|
41
41
|
function isValidContributedKeyBinding(keyBinding, rejects) {
|
|
42
42
|
if (!keyBinding) {
|
|
43
|
-
rejects.push(
|
|
43
|
+
rejects.push(nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'nonempty', "expected non-empty value."));
|
|
44
44
|
return false;
|
|
45
45
|
}
|
|
46
46
|
if (typeof keyBinding.command !== 'string') {
|
|
47
|
-
rejects.push(
|
|
48
|
-
'requirestring',
|
|
49
|
-
"property `{0}` is mandatory and must be of type `string`",
|
|
50
|
-
'command'
|
|
51
|
-
)));
|
|
47
|
+
rejects.push(nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'requirestring', "property `{0}` is mandatory and must be of type `string`", 'command'));
|
|
52
48
|
return false;
|
|
53
49
|
}
|
|
54
50
|
if (keyBinding.key && typeof keyBinding.key !== 'string') {
|
|
55
|
-
rejects.push(
|
|
56
|
-
'optstring',
|
|
57
|
-
"property `{0}` can be omitted or must be of type `string`",
|
|
58
|
-
'key'
|
|
59
|
-
)));
|
|
51
|
+
rejects.push(nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'optstring', "property `{0}` can be omitted or must be of type `string`", 'key'));
|
|
60
52
|
return false;
|
|
61
53
|
}
|
|
62
54
|
if (keyBinding.when && typeof keyBinding.when !== 'string') {
|
|
63
|
-
rejects.push(
|
|
64
|
-
'optstring',
|
|
65
|
-
"property `{0}` can be omitted or must be of type `string`",
|
|
66
|
-
'when'
|
|
67
|
-
)));
|
|
55
|
+
rejects.push(nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'optstring', "property `{0}` can be omitted or must be of type `string`", 'when'));
|
|
68
56
|
return false;
|
|
69
57
|
}
|
|
70
58
|
if (keyBinding.mac && typeof keyBinding.mac !== 'string') {
|
|
71
|
-
rejects.push(
|
|
72
|
-
'optstring',
|
|
73
|
-
"property `{0}` can be omitted or must be of type `string`",
|
|
74
|
-
'mac'
|
|
75
|
-
)));
|
|
59
|
+
rejects.push(nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'optstring', "property `{0}` can be omitted or must be of type `string`", 'mac'));
|
|
76
60
|
return false;
|
|
77
61
|
}
|
|
78
62
|
if (keyBinding.linux && typeof keyBinding.linux !== 'string') {
|
|
79
|
-
rejects.push(
|
|
80
|
-
'optstring',
|
|
81
|
-
"property `{0}` can be omitted or must be of type `string`",
|
|
82
|
-
'linux'
|
|
83
|
-
)));
|
|
63
|
+
rejects.push(nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'optstring', "property `{0}` can be omitted or must be of type `string`", 'linux'));
|
|
84
64
|
return false;
|
|
85
65
|
}
|
|
86
66
|
if (keyBinding.win && typeof keyBinding.win !== 'string') {
|
|
87
|
-
rejects.push(
|
|
88
|
-
'optstring',
|
|
89
|
-
"property `{0}` can be omitted or must be of type `string`",
|
|
90
|
-
'win'
|
|
91
|
-
)));
|
|
67
|
+
rejects.push(nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'optstring', "property `{0}` can be omitted or must be of type `string`", 'win'));
|
|
92
68
|
return false;
|
|
93
69
|
}
|
|
94
70
|
return true;
|
|
@@ -98,51 +74,30 @@ const keybindingType = {
|
|
|
98
74
|
default: { command: '', key: '' },
|
|
99
75
|
properties: {
|
|
100
76
|
command: {
|
|
101
|
-
description: (
|
|
102
|
-
'vscode.extension.contributes.keybindings.command',
|
|
103
|
-
'Identifier of the command to run when keybinding is triggered.'
|
|
104
|
-
)),
|
|
77
|
+
description: nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'vscode.extension.contributes.keybindings.command', 'Identifier of the command to run when keybinding is triggered.'),
|
|
105
78
|
type: 'string'
|
|
106
79
|
},
|
|
107
80
|
args: {
|
|
108
|
-
description: (
|
|
109
|
-
'vscode.extension.contributes.keybindings.args',
|
|
110
|
-
"Arguments to pass to the command to execute."
|
|
111
|
-
))
|
|
81
|
+
description: nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'vscode.extension.contributes.keybindings.args', "Arguments to pass to the command to execute.")
|
|
112
82
|
},
|
|
113
83
|
key: {
|
|
114
|
-
description: (
|
|
115
|
-
'vscode.extension.contributes.keybindings.key',
|
|
116
|
-
'Key or key sequence (separate keys with plus-sign and sequences with space, e.g. Ctrl+O and Ctrl+L L for a chord).'
|
|
117
|
-
)),
|
|
84
|
+
description: nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'vscode.extension.contributes.keybindings.key', 'Key or key sequence (separate keys with plus-sign and sequences with space, e.g. Ctrl+O and Ctrl+L L for a chord).'),
|
|
118
85
|
type: 'string'
|
|
119
86
|
},
|
|
120
87
|
mac: {
|
|
121
|
-
description: (
|
|
122
|
-
'vscode.extension.contributes.keybindings.mac',
|
|
123
|
-
'Mac specific key or key sequence.'
|
|
124
|
-
)),
|
|
88
|
+
description: nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'vscode.extension.contributes.keybindings.mac', 'Mac specific key or key sequence.'),
|
|
125
89
|
type: 'string'
|
|
126
90
|
},
|
|
127
91
|
linux: {
|
|
128
|
-
description: (
|
|
129
|
-
'vscode.extension.contributes.keybindings.linux',
|
|
130
|
-
'Linux specific key or key sequence.'
|
|
131
|
-
)),
|
|
92
|
+
description: nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'vscode.extension.contributes.keybindings.linux', 'Linux specific key or key sequence.'),
|
|
132
93
|
type: 'string'
|
|
133
94
|
},
|
|
134
95
|
win: {
|
|
135
|
-
description: (
|
|
136
|
-
'vscode.extension.contributes.keybindings.win',
|
|
137
|
-
'Windows specific key or key sequence.'
|
|
138
|
-
)),
|
|
96
|
+
description: nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'vscode.extension.contributes.keybindings.win', 'Windows specific key or key sequence.'),
|
|
139
97
|
type: 'string'
|
|
140
98
|
},
|
|
141
99
|
when: {
|
|
142
|
-
description: (
|
|
143
|
-
'vscode.extension.contributes.keybindings.when',
|
|
144
|
-
'Condition when the key is active.'
|
|
145
|
-
)),
|
|
100
|
+
description: nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'vscode.extension.contributes.keybindings.when', 'Condition when the key is active.'),
|
|
146
101
|
type: 'string'
|
|
147
102
|
},
|
|
148
103
|
}
|
|
@@ -151,7 +106,7 @@ const keybindingsExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
|
151
106
|
extensionPoint: 'keybindings',
|
|
152
107
|
deps: [commandsExtensionPoint],
|
|
153
108
|
jsonSchema: {
|
|
154
|
-
description:
|
|
109
|
+
description: nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'vscode.extension.contributes.keybindings', "Contributes keybindings."),
|
|
155
110
|
oneOf: [
|
|
156
111
|
keybindingType,
|
|
157
112
|
{
|
|
@@ -504,12 +459,7 @@ let WorkbenchKeybindingService = WorkbenchKeybindingService_1 = class WorkbenchK
|
|
|
504
459
|
}
|
|
505
460
|
}
|
|
506
461
|
if (rejects.length > 0) {
|
|
507
|
-
collector.error((
|
|
508
|
-
'invalid.keybindings',
|
|
509
|
-
"Invalid `contributes.{0}`: {1}",
|
|
510
|
-
keybindingsExtPoint.name,
|
|
511
|
-
rejects.join('\n')
|
|
512
|
-
)));
|
|
462
|
+
collector.error(nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'invalid.keybindings', "Invalid `contributes.{0}`: {1}", keybindingsExtPoint.name, rejects.join('\n')));
|
|
513
463
|
}
|
|
514
464
|
}
|
|
515
465
|
static bindToCurrentPlatform(key, mac, linux, win) {
|
|
@@ -593,7 +543,7 @@ let WorkbenchKeybindingService = WorkbenchKeybindingService_1 = class WorkbenchK
|
|
|
593
543
|
static _getAllCommandsAsComment(boundCommands) {
|
|
594
544
|
const unboundCommands = getAllUnboundCommands(boundCommands);
|
|
595
545
|
const pretty = unboundCommands.sort().join('\n// - ');
|
|
596
|
-
return '// ' +
|
|
546
|
+
return '// ' + nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'unboundCommands', "Here are other available commands: ") + '\n// - ' + pretty;
|
|
597
547
|
}
|
|
598
548
|
mightProducePrintableCharacter(event) {
|
|
599
549
|
if (event.ctrlKey || event.metaKey || event.altKey) {
|
|
@@ -718,7 +668,7 @@ class KeybindingsJsonSchema {
|
|
|
718
668
|
this.schema = {
|
|
719
669
|
id: KeybindingsJsonSchema.schemaId,
|
|
720
670
|
type: 'array',
|
|
721
|
-
title:
|
|
671
|
+
title: nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'keybindings.json.title', "Keybindings configuration"),
|
|
722
672
|
allowTrailingCommas: true,
|
|
723
673
|
allowComments: true,
|
|
724
674
|
definitions: {
|
|
@@ -742,7 +692,7 @@ class KeybindingsJsonSchema {
|
|
|
742
692
|
'type': 'string',
|
|
743
693
|
'enum': this.commandsEnum,
|
|
744
694
|
'enumDescriptions': this.commandsEnumDescriptions,
|
|
745
|
-
'description':
|
|
695
|
+
'description': nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'keybindings.json.command', "Name of the command to execute"),
|
|
746
696
|
},
|
|
747
697
|
'commandType': {
|
|
748
698
|
'anyOf': [
|
|
@@ -753,10 +703,7 @@ class KeybindingsJsonSchema {
|
|
|
753
703
|
'type': 'string',
|
|
754
704
|
'enum': this.removalCommandsEnum,
|
|
755
705
|
'enumDescriptions': this.commandsEnumDescriptions,
|
|
756
|
-
'description': (
|
|
757
|
-
'keybindings.json.removalCommand',
|
|
758
|
-
"Name of the command to remove keyboard shortcut for"
|
|
759
|
-
)),
|
|
706
|
+
'description': nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'keybindings.json.removalCommand', "Name of the command to remove keyboard shortcut for"),
|
|
760
707
|
},
|
|
761
708
|
{
|
|
762
709
|
'type': 'string'
|
|
@@ -774,7 +721,7 @@ class KeybindingsJsonSchema {
|
|
|
774
721
|
'properties': {
|
|
775
722
|
'key': {
|
|
776
723
|
'type': 'string',
|
|
777
|
-
'description':
|
|
724
|
+
'description': nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'keybindings.json.key', "Key or key sequence (separated by space)"),
|
|
778
725
|
},
|
|
779
726
|
'command': {
|
|
780
727
|
'anyOf': [
|
|
@@ -786,11 +733,7 @@ class KeybindingsJsonSchema {
|
|
|
786
733
|
'not': {
|
|
787
734
|
'type': 'array'
|
|
788
735
|
},
|
|
789
|
-
'errorMessage': (
|
|
790
|
-
'keybindings.commandsIsArray',
|
|
791
|
-
"Incorrect type. Expected \"{0}\". The field 'command' does not support running multiple commands. Use command 'runCommands' to pass it multiple commands to run.",
|
|
792
|
-
'string'
|
|
793
|
-
))
|
|
736
|
+
'errorMessage': nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'keybindings.commandsIsArray', "Incorrect type. Expected \"{0}\". The field 'command' does not support running multiple commands. Use command 'runCommands' to pass it multiple commands to run.", 'string')
|
|
794
737
|
},
|
|
795
738
|
'else': {
|
|
796
739
|
'$ref': '#/definitions/commandType'
|
|
@@ -803,10 +746,10 @@ class KeybindingsJsonSchema {
|
|
|
803
746
|
},
|
|
804
747
|
'when': {
|
|
805
748
|
'type': 'string',
|
|
806
|
-
'description':
|
|
749
|
+
'description': nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'keybindings.json.when', "Condition when the key is active.")
|
|
807
750
|
},
|
|
808
751
|
'args': {
|
|
809
|
-
'description':
|
|
752
|
+
'description': nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'keybindings.json.args', "Arguments to pass to the command to execute.")
|
|
810
753
|
}
|
|
811
754
|
},
|
|
812
755
|
'$ref': '#/definitions/commandsSchemas'
|
|
@@ -477,12 +477,12 @@ const keyboardConfiguration = {
|
|
|
477
477
|
'id': 'keyboard',
|
|
478
478
|
'order': 15,
|
|
479
479
|
'type': 'object',
|
|
480
|
-
'title':
|
|
480
|
+
'title': nls.localizeWithPath('vs/workbench/services/keybinding/browser/keyboardLayoutService', 'keyboardConfigurationTitle', "Keyboard"),
|
|
481
481
|
'properties': {
|
|
482
482
|
'keyboard.layout': {
|
|
483
483
|
'type': 'string',
|
|
484
484
|
'default': 'autodetect',
|
|
485
|
-
'description':
|
|
485
|
+
'description': nls.localizeWithPath('vs/workbench/services/keybinding/browser/keyboardLayoutService', 'keyboard.layout.config', "Control the keyboard layout used in web.")
|
|
486
486
|
}
|
|
487
487
|
}
|
|
488
488
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import {
|
|
2
|
+
import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
|
|
3
3
|
import { Queue } from 'monaco-editor/esm/vs/base/common/async.js';
|
|
4
4
|
import * as json from 'monaco-editor/esm/vs/base/common/json.js';
|
|
5
5
|
import * as objects from 'monaco-editor/esm/vs/base/common/objects.js';
|
|
@@ -214,10 +214,9 @@ let KeybindingsEditingService = class KeybindingsEditingService extends Disposab
|
|
|
214
214
|
}
|
|
215
215
|
resolveAndValidate() {
|
|
216
216
|
if (this.textFileService.isDirty(this.userDataProfileService.currentProfile.keybindingsResource)) {
|
|
217
|
-
return Promise.reject(( new Error(
|
|
218
|
-
'errorKeybindingsFileDirty',
|
|
219
|
-
|
|
220
|
-
)))));
|
|
217
|
+
return Promise.reject(( new Error(
|
|
218
|
+
localizeWithPath('vs/workbench/services/keybinding/common/keybindingEditing', 'errorKeybindingsFileDirty', "Unable to write because the keybindings configuration file has unsaved changes. Please save it first and then try again.")
|
|
219
|
+
)));
|
|
221
220
|
}
|
|
222
221
|
return this.resolveModelReference()
|
|
223
222
|
.then(reference => {
|
|
@@ -227,18 +226,16 @@ let KeybindingsEditingService = class KeybindingsEditingService extends Disposab
|
|
|
227
226
|
const parsed = this.parse(model);
|
|
228
227
|
if (parsed.parseErrors.length) {
|
|
229
228
|
reference.dispose();
|
|
230
|
-
return Promise.reject(( new Error(
|
|
231
|
-
'parseErrors',
|
|
232
|
-
|
|
233
|
-
)))));
|
|
229
|
+
return Promise.reject(( new Error(
|
|
230
|
+
localizeWithPath('vs/workbench/services/keybinding/common/keybindingEditing', 'parseErrors', "Unable to write to the keybindings configuration file. Please open it to correct errors/warnings in the file and try again.")
|
|
231
|
+
)));
|
|
234
232
|
}
|
|
235
233
|
if (parsed.result) {
|
|
236
234
|
if (!Array.isArray(parsed.result)) {
|
|
237
235
|
reference.dispose();
|
|
238
|
-
return Promise.reject(( new Error(
|
|
239
|
-
'errorInvalidConfiguration',
|
|
240
|
-
|
|
241
|
-
)))));
|
|
236
|
+
return Promise.reject(( new Error(
|
|
237
|
+
localizeWithPath('vs/workbench/services/keybinding/common/keybindingEditing', 'errorInvalidConfiguration', "Unable to write to the keybindings configuration file. It has an object which is not of type Array. Please open the file to clean up and try again.")
|
|
238
|
+
)));
|
|
242
239
|
}
|
|
243
240
|
}
|
|
244
241
|
else {
|
|
@@ -259,10 +256,7 @@ let KeybindingsEditingService = class KeybindingsEditingService extends Disposab
|
|
|
259
256
|
return { result, parseErrors };
|
|
260
257
|
}
|
|
261
258
|
getEmptyContent(EOL) {
|
|
262
|
-
return '// ' + (
|
|
263
|
-
'emptyKeybindingsHeader',
|
|
264
|
-
"Place your key bindings in this file to override the defaults"
|
|
265
|
-
)) + EOL + '[]';
|
|
259
|
+
return '// ' + localizeWithPath('vs/workbench/services/keybinding/common/keybindingEditing', 'emptyKeybindingsHeader', "Place your key bindings in this file to override the defaults") + EOL + '[]';
|
|
266
260
|
}
|
|
267
261
|
};
|
|
268
262
|
KeybindingsEditingService = ( __decorate([
|
|
@@ -63,7 +63,7 @@ class ScanCodeCombo {
|
|
|
63
63
|
this.scanCode = scanCode;
|
|
64
64
|
}
|
|
65
65
|
toString() {
|
|
66
|
-
return `${this.ctrlKey ? 'Ctrl+' : ''}${this.shiftKey ? 'Shift+' : ''}${this.altKey ? 'Alt+' : ''}${(
|
|
66
|
+
return `${this.ctrlKey ? 'Ctrl+' : ''}${this.shiftKey ? 'Shift+' : ''}${this.altKey ? 'Alt+' : ''}${( ScanCodeUtils.toString(this.scanCode))}`;
|
|
67
67
|
}
|
|
68
68
|
equals(other) {
|
|
69
69
|
return (this.ctrlKey === other.ctrlKey
|
|
@@ -92,7 +92,7 @@ class ScanCodeCombo {
|
|
|
92
92
|
return ' --- ';
|
|
93
93
|
}
|
|
94
94
|
if (charCode >= 768 && charCode <= 879 ) {
|
|
95
|
-
return 'U+' + (
|
|
95
|
+
return 'U+' + ( charCode.toString(16));
|
|
96
96
|
}
|
|
97
97
|
return ' ' + String.fromCharCode(charCode) + ' ';
|
|
98
98
|
}
|
|
@@ -105,7 +105,7 @@ class KeyCodeCombo {
|
|
|
105
105
|
this.keyCode = keyCode;
|
|
106
106
|
}
|
|
107
107
|
toString() {
|
|
108
|
-
return `${this.ctrlKey ? 'Ctrl+' : ''}${this.shiftKey ? 'Shift+' : ''}${this.altKey ? 'Alt+' : ''}${(
|
|
108
|
+
return `${this.ctrlKey ? 'Ctrl+' : ''}${this.shiftKey ? 'Shift+' : ''}${this.altKey ? 'Alt+' : ''}${( KeyCodeUtils.toString(this.keyCode))}`;
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
class ScanCodeKeyCodeMapper {
|
|
@@ -184,7 +184,7 @@ class ScanCodeKeyCodeMapper {
|
|
|
184
184
|
const shiftKey = (scanCodeComboEncoded & 0b010) ? true : false;
|
|
185
185
|
const altKey = (scanCodeComboEncoded & 0b100) ? true : false;
|
|
186
186
|
const scanCode = (scanCodeComboEncoded >>> 3);
|
|
187
|
-
result[i] = (
|
|
187
|
+
result[i] = ( new ScanCodeCombo(ctrlKey, shiftKey, altKey, scanCode));
|
|
188
188
|
}
|
|
189
189
|
return result;
|
|
190
190
|
}
|
|
@@ -201,7 +201,7 @@ class ScanCodeKeyCodeMapper {
|
|
|
201
201
|
const shiftKey = (keyCodeComboEncoded & 0b010) ? true : false;
|
|
202
202
|
const altKey = (keyCodeComboEncoded & 0b100) ? true : false;
|
|
203
203
|
const keyCode = (keyCodeComboEncoded >>> 3);
|
|
204
|
-
result[i] = (
|
|
204
|
+
result[i] = ( new KeyCodeCombo(ctrlKey, shiftKey, altKey, keyCode));
|
|
205
205
|
}
|
|
206
206
|
return result;
|
|
207
207
|
}
|
|
@@ -220,8 +220,8 @@ class ScanCodeKeyCodeMapper {
|
|
|
220
220
|
case 45 : return 21 ;
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
|
-
const keyCodeCombos1 = this.lookupScanCodeCombo((
|
|
224
|
-
const keyCodeCombos2 = this.lookupScanCodeCombo((
|
|
223
|
+
const keyCodeCombos1 = this.lookupScanCodeCombo(( new ScanCodeCombo(false, false, false, scanCode)));
|
|
224
|
+
const keyCodeCombos2 = this.lookupScanCodeCombo(( new ScanCodeCombo(false, true, false, scanCode)));
|
|
225
225
|
if (keyCodeCombos1.length === 1 && keyCodeCombos2.length === 1) {
|
|
226
226
|
const shiftKey1 = keyCodeCombos1[0].shiftKey;
|
|
227
227
|
const keyCode1 = keyCodeCombos1[0].keyCode;
|
|
@@ -254,21 +254,21 @@ class MacLinuxKeyboardMapper {
|
|
|
254
254
|
this._scanCodeToLabel = [];
|
|
255
255
|
this._scanCodeToDispatch = [];
|
|
256
256
|
this._codeInfo = [];
|
|
257
|
-
this._scanCodeKeyCodeMapper = (
|
|
257
|
+
this._scanCodeKeyCodeMapper = ( new ScanCodeKeyCodeMapper());
|
|
258
258
|
this._scanCodeToLabel = [];
|
|
259
259
|
this._scanCodeToDispatch = [];
|
|
260
260
|
const _registerIfUnknown = (hwCtrlKey, hwShiftKey, hwAltKey, scanCode, kbCtrlKey, kbShiftKey, kbAltKey, keyCode) => {
|
|
261
|
-
this._scanCodeKeyCodeMapper.registerIfUnknown((
|
|
261
|
+
this._scanCodeKeyCodeMapper.registerIfUnknown(( new ScanCodeCombo(
|
|
262
262
|
hwCtrlKey ? true : false,
|
|
263
263
|
hwShiftKey ? true : false,
|
|
264
264
|
hwAltKey ? true : false,
|
|
265
265
|
scanCode
|
|
266
|
-
))
|
|
266
|
+
)), ( new KeyCodeCombo(
|
|
267
267
|
kbCtrlKey ? true : false,
|
|
268
268
|
kbShiftKey ? true : false,
|
|
269
269
|
kbAltKey ? true : false,
|
|
270
270
|
keyCode
|
|
271
|
-
)))
|
|
271
|
+
)));
|
|
272
272
|
};
|
|
273
273
|
const _registerAllCombos = (_ctrlKey, _shiftKey, _altKey, scanCode, keyCode) => {
|
|
274
274
|
for (let ctrlKey = _ctrlKey; ctrlKey <= 1; ctrlKey++) {
|
|
@@ -289,12 +289,12 @@ class MacLinuxKeyboardMapper {
|
|
|
289
289
|
const keyCode = IMMUTABLE_CODE_TO_KEY_CODE[scanCode];
|
|
290
290
|
if (keyCode !== -1 ) {
|
|
291
291
|
_registerAllCombos(0, 0, 0, scanCode, keyCode);
|
|
292
|
-
this._scanCodeToLabel[scanCode] = (
|
|
292
|
+
this._scanCodeToLabel[scanCode] = ( KeyCodeUtils.toString(keyCode));
|
|
293
293
|
if (keyCode === 0 || keyCode === 5 || keyCode === 57 || keyCode === 6 || keyCode === 4 ) {
|
|
294
294
|
this._scanCodeToDispatch[scanCode] = null;
|
|
295
295
|
}
|
|
296
296
|
else {
|
|
297
|
-
this._scanCodeToDispatch[scanCode] = `[${(
|
|
297
|
+
this._scanCodeToDispatch[scanCode] = `[${( ScanCodeUtils.toString(scanCode))}]`;
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
}
|
|
@@ -320,7 +320,7 @@ class MacLinuxKeyboardMapper {
|
|
|
320
320
|
}
|
|
321
321
|
const _registerLetterIfMissing = (charCode, scanCode, value, withShift) => {
|
|
322
322
|
if (!producesLatinLetter[charCode]) {
|
|
323
|
-
missingLatinLettersOverride[(
|
|
323
|
+
missingLatinLettersOverride[( ScanCodeUtils.toString(scanCode))] = {
|
|
324
324
|
value: value,
|
|
325
325
|
withShift: withShift,
|
|
326
326
|
withAltGr: '',
|
|
@@ -380,7 +380,7 @@ class MacLinuxKeyboardMapper {
|
|
|
380
380
|
withShiftAltGr: withShiftAltGr,
|
|
381
381
|
};
|
|
382
382
|
mappings[mappingsLen++] = mapping;
|
|
383
|
-
this._scanCodeToDispatch[scanCode] = `[${(
|
|
383
|
+
this._scanCodeToDispatch[scanCode] = `[${( ScanCodeUtils.toString(scanCode))}]`;
|
|
384
384
|
if (value >= 97 && value <= 122 ) {
|
|
385
385
|
const upperCaseValue = 65 + ((value - 97) );
|
|
386
386
|
this._scanCodeToLabel[scanCode] = String.fromCharCode(upperCaseValue);
|
|
@@ -529,7 +529,7 @@ class MacLinuxKeyboardMapper {
|
|
|
529
529
|
const hwCtrlKey = (mod & 0b001) ? true : false;
|
|
530
530
|
const hwShiftKey = (mod & 0b010) ? true : false;
|
|
531
531
|
const hwAltKey = (mod & 0b100) ? true : false;
|
|
532
|
-
const scanCodeCombo = (
|
|
532
|
+
const scanCodeCombo = ( new ScanCodeCombo(hwCtrlKey, hwShiftKey, hwAltKey, scanCode));
|
|
533
533
|
const resolvedKb = this.resolveKeyboardEvent({
|
|
534
534
|
_standardKeyboardEventBrand: true,
|
|
535
535
|
ctrlKey: scanCodeCombo.ctrlKey,
|
|
@@ -538,9 +538,9 @@ class MacLinuxKeyboardMapper {
|
|
|
538
538
|
metaKey: false,
|
|
539
539
|
altGraphKey: false,
|
|
540
540
|
keyCode: -1 ,
|
|
541
|
-
code: (
|
|
541
|
+
code: ( ScanCodeUtils.toString(scanCode))
|
|
542
542
|
});
|
|
543
|
-
const outScanCodeCombo = (
|
|
543
|
+
const outScanCodeCombo = ( scanCodeCombo.toString());
|
|
544
544
|
const outKey = scanCodeCombo.getProducedChar(mapping);
|
|
545
545
|
const ariaLabel = resolvedKb.getAriaLabel();
|
|
546
546
|
const outUILabel = (ariaLabel ? ariaLabel.replace(/Control\+/, 'Ctrl+') : null);
|
|
@@ -571,7 +571,7 @@ class MacLinuxKeyboardMapper {
|
|
|
571
571
|
}
|
|
572
572
|
colPriority = String(priority);
|
|
573
573
|
}
|
|
574
|
-
const outKeybinding = (
|
|
574
|
+
const outKeybinding = ( kbCombo.toString());
|
|
575
575
|
if (i === 0) {
|
|
576
576
|
result.push(`| ${this._leftPad(outScanCodeCombo, 30)} | ${outKey} | ${this._leftPad(outKeybinding, 25)} | ${this._leftPad(colPriority, 3)} | ${this._leftPad(outUILabel, 25)} | ${this._leftPad(outUserSettings, 30)} | ${this._leftPad(outElectronAccelerator, 25)} | ${this._leftPad(outDispatchStr, 30)} | ${outWYSIWYG} |`);
|
|
577
577
|
}
|
|
@@ -596,25 +596,25 @@ class MacLinuxKeyboardMapper {
|
|
|
596
596
|
}
|
|
597
597
|
keyCodeChordToScanCodeChord(chord) {
|
|
598
598
|
if (chord.keyCode === 3 ) {
|
|
599
|
-
return [(
|
|
599
|
+
return [( new ScanCodeChord(
|
|
600
600
|
chord.ctrlKey,
|
|
601
601
|
chord.shiftKey,
|
|
602
602
|
chord.altKey,
|
|
603
603
|
chord.metaKey,
|
|
604
604
|
46
|
|
605
|
-
))
|
|
605
|
+
))];
|
|
606
606
|
}
|
|
607
|
-
const scanCodeCombos = this._scanCodeKeyCodeMapper.lookupKeyCodeCombo((
|
|
607
|
+
const scanCodeCombos = this._scanCodeKeyCodeMapper.lookupKeyCodeCombo(( new KeyCodeCombo(chord.ctrlKey, chord.shiftKey, chord.altKey, chord.keyCode)));
|
|
608
608
|
const result = [];
|
|
609
609
|
for (let i = 0, len = scanCodeCombos.length; i < len; i++) {
|
|
610
610
|
const scanCodeCombo = scanCodeCombos[i];
|
|
611
|
-
result[i] = (
|
|
611
|
+
result[i] = ( new ScanCodeChord(
|
|
612
612
|
scanCodeCombo.ctrlKey,
|
|
613
613
|
scanCodeCombo.shiftKey,
|
|
614
614
|
scanCodeCombo.altKey,
|
|
615
615
|
chord.metaKey,
|
|
616
616
|
scanCodeCombo.scanCode
|
|
617
|
-
))
|
|
617
|
+
));
|
|
618
618
|
}
|
|
619
619
|
return result;
|
|
620
620
|
}
|
|
@@ -682,13 +682,13 @@ class MacLinuxKeyboardMapper {
|
|
|
682
682
|
}
|
|
683
683
|
const constantKeyCode = this._scanCodeKeyCodeMapper.guessStableKeyCode(chord.scanCode);
|
|
684
684
|
if (constantKeyCode !== -1 ) {
|
|
685
|
-
const reverseChords = this.keyCodeChordToScanCodeChord((
|
|
685
|
+
const reverseChords = this.keyCodeChordToScanCodeChord(( new KeyCodeChord(
|
|
686
686
|
chord.ctrlKey,
|
|
687
687
|
chord.shiftKey,
|
|
688
688
|
chord.altKey,
|
|
689
689
|
chord.metaKey,
|
|
690
690
|
constantKeyCode
|
|
691
|
-
)))
|
|
691
|
+
)));
|
|
692
692
|
for (let i = 0, len = reverseChords.length; i < len; i++) {
|
|
693
693
|
const reverseChord = reverseChords[i];
|
|
694
694
|
if (reverseChord.scanCode === chord.scanCode) {
|
|
@@ -740,7 +740,7 @@ class MacLinuxKeyboardMapper {
|
|
|
740
740
|
for (let i = 0, len = chordPart.length; i < len; i++) {
|
|
741
741
|
const chords = [...previousParts, chordPart[i]];
|
|
742
742
|
if (isFinalIndex) {
|
|
743
|
-
result.push((
|
|
743
|
+
result.push(( new NativeResolvedKeybinding(this, this._OS, chords)));
|
|
744
744
|
}
|
|
745
745
|
else {
|
|
746
746
|
this._generateResolvedKeybindings(chordParts, currentIndex + 1, chords, result);
|
|
@@ -791,10 +791,8 @@ class MacLinuxKeyboardMapper {
|
|
|
791
791
|
}
|
|
792
792
|
const ctrlKey = keyboardEvent.ctrlKey || (this._mapAltGrToCtrlAlt && keyboardEvent.altGraphKey);
|
|
793
793
|
const altKey = keyboardEvent.altKey || (this._mapAltGrToCtrlAlt && keyboardEvent.altGraphKey);
|
|
794
|
-
const chord = (
|
|
795
|
-
return (
|
|
796
|
-
(new NativeResolvedKeybinding(this, this._OS, [chord]))
|
|
797
|
-
);
|
|
794
|
+
const chord = ( new ScanCodeChord(ctrlKey, keyboardEvent.shiftKey, altKey, keyboardEvent.metaKey, code));
|
|
795
|
+
return ( new NativeResolvedKeybinding(this, this._OS, [chord]));
|
|
798
796
|
}
|
|
799
797
|
_resolveChord(chord) {
|
|
800
798
|
if (!chord) {
|
|
@@ -806,7 +804,7 @@ class MacLinuxKeyboardMapper {
|
|
|
806
804
|
return this.keyCodeChordToScanCodeChord(chord);
|
|
807
805
|
}
|
|
808
806
|
resolveKeybinding(keybinding) {
|
|
809
|
-
const chords = (
|
|
807
|
+
const chords = ( keybinding.chords.map(chord => this._resolveChord(chord)));
|
|
810
808
|
return this._toResolvedKeybinding(chords);
|
|
811
809
|
}
|
|
812
810
|
static _redirectCharCode(charCode) {
|