/** * "VS Code (macOS)" keymap: our action ids mapped to the closest Visual Studio * Code default shortcuts. Actions without a VS Code equivalent are listed with * no binding so switching presets doesn't leak IntelliJ shortcuts. */ export const vscodeMacos: Record = { "editor.addOrRemoveCaret": ["Alt+Shift+Button1"], "editor.createRectangularSelectionOnMouseDrag": ["Alt+Button1", "Button2"], // Navigate "navigate.searchEverywhere": ["Shift Shift"], "navigate.gotoClass": [], "navigate.gotoFile": ["Meta+P"], "navigate.gotoSymbol": ["Meta+T"], "navigate.findAction": ["Meta+Shift+P", "F1"], "navigate.navigationBar": ["Meta+Shift+."], "navigate.switcher": ["Ctrl+Tab"], "navigate.switcherBack": ["Ctrl+Shift+Tab"], "navigate.recentFiles": [], "navigate.recentLocations": [], "navigate.back": ["Ctrl+-", "Button4", "SwipeRight"], "navigate.forward": ["Ctrl+Shift+-", "Button5", "SwipeLeft"], "navigate.gotoLine": ["Ctrl+G"], "navigate.declaration": ["F12"], "navigate.implementation": ["Meta+F12"], "navigate.typeDeclaration": [], "navigate.fileStructure": ["Meta+Shift+O"], "db.goToColumn": ["Meta+Shift+O"], "db.submitChanges": ["Meta+Enter"], "db.revertChanges": ["Meta+Alt+Z"], // Data editor commands: VS Code has no counterpart. "db.reloadPage": [], "db.firstPage": [], "db.previousPage": [], "db.nextPage": [], "db.lastPage": [], "db.addRow": [], "db.deleteRows": [], "db.restoreRows": [], "db.revertSelected": ["Meta+Alt+Z"], "db.copyAggregationResult": [], "db.exportData": [], "db.editCell": [], "navigate.relatedSymbol": [], // vscode-clangd's clangd.switchheadersource. "navigate.headerSource": ["Alt+O"], "navigate.nextError": ["F8"], "navigate.prevError": ["Shift+F8"], "navigate.callHierarchy": ["Alt+Shift+H"], "navigate.showFilePath": [], "navigate.customRegion": [], "editor.contextInfo": [], // editor.action.wordHighlight.next / prev "navigate.nextHighlightedUsage": ["F7"], "navigate.prevHighlightedUsage": ["Shift+F7"], "editor.codeBlockStartWithSelection": [], "editor.codeBlockEndWithSelection": [], "code.collapseBlock": [], "code.expandToLevel1": [], "code.expandAllToLevel1": [], "code.expandToLevel2": [], "code.expandAllToLevel2": [], "code.expandToLevel3": [], "code.expandAllToLevel3": [], "code.expandToLevel4": [], "code.expandAllToLevel4": [], "code.expandToLevel5": [], "code.expandAllToLevel5": [], "code.autoIndentLines": [], "code.showErrorDescription": [], "code.surroundWithLiveTemplate": [], "code.saveAsLiveTemplate": [], "code.moveElementLeft": [], "code.moveElementRight": [], "analyze.inspectFile": [], "project.copyElement": [], "run.chooseDebugConfig": [], "debug.quickEvaluate": [], "debug.browseConsoleHistory": [], "editor.nextSplitter": [], "editor.prevSplitter": [], "toolwindow.resizeLeft": [], "toolwindow.resizeRight": [], "toolwindow.resizeUp": [], "toolwindow.resizeDown": [], "layout.restoreCurrent": [], "layout.restoreDefault": [], "workbench.stopBackgroundProcesses": [], "navigate.typeHierarchy": [], "navigate.toggleBookmark": [], "navigate.showBookmarks": [], "navigate.toggleBookmarkWithMnemonic": [], "navigate.toggleBookmark0": [], "navigate.toggleBookmark1": [], "navigate.toggleBookmark2": [], "navigate.toggleBookmark3": [], "navigate.toggleBookmark4": [], "navigate.toggleBookmark5": [], "navigate.toggleBookmark6": [], "navigate.toggleBookmark7": [], "navigate.toggleBookmark8": [], "navigate.toggleBookmark9": [], "navigate.gotoBookmark0": [], "navigate.gotoBookmark1": [], "navigate.gotoBookmark2": [], "navigate.gotoBookmark3": [], "navigate.gotoBookmark4": [], "navigate.gotoBookmark5": [], "navigate.gotoBookmark6": [], "navigate.gotoBookmark7": [], "navigate.gotoBookmark8": [], "navigate.gotoBookmark9": [], "navigate.selectIn": [], "navigate.lastEditLocation": [], "navigate.nextEditLocation": [], "navigate.gotoTest": [], "navigate.superMethod": [], "navigate.nextMethod": [], "navigate.previousMethod": [], "navigate.nextOccurrence": [], "navigate.prevOccurrence": [], // Find "find.inFile": ["Meta+F"], "agents.findInConversation": ["Meta+F"], "find.replaceInFile": ["Meta+Alt+F"], "find.next": ["Meta+G"], "find.previous": ["Meta+Shift+G"], // Find Next / Previous Selection: the selection, or the word at the caret. "find.wordAtCaret": ["Meta+F3"], "find.previousWordAtCaret": ["Meta+Shift+F3"], "find.inPath": ["Meta+Shift+F"], "find.replaceInPath": ["Meta+Shift+H"], "find.usages": ["Alt+Shift+F12"], "find.showUsages": ["Shift+F12"], "find.recentUsages": [], "find.highlightUsages": [], // Code "code.completion": ["Ctrl+Space"], "code.smartTypeCompletion": [], "editor.inlineCompletion.trigger": ["Alt+\\"], "editor.inlineCompletion.accept": ["Tab"], "editor.inlineCompletion.acceptWord": ["Meta+Right"], "editor.inlineCompletion.dismiss": ["Escape"], "editor.inlineCompletion.next": ["Alt+]"], "editor.inlineCompletion.previous": ["Alt+["], "code.parameterInfo": ["Meta+Shift+Space"], "code.quickDocumentation": ["Meta+K Meta+I"], "code.quickDefinition": ["Alt+F12"], "code.showIntentions": ["Meta+."], "code.applyQuickFix": [], "code.generate": [], "code.reformat": ["Alt+Shift+F"], "code.rearrange": [], "code.reformatDialog": [], "code.optimizeImports": ["Alt+Shift+O"], "code.commentLine": ["Meta+/"], "code.commentBlock": ["Alt+Shift+A"], "code.extendSelection": ["Ctrl+Shift+Meta+Right"], "code.shrinkSelection": ["Ctrl+Shift+Meta+Left"], "code.duplicateLine": ["Alt+Shift+Down"], "code.duplicateEntireLines": [], "code.deleteLine": ["Meta+Shift+K"], "code.deleteToLineStart": [], "code.deleteToLineEnd": [], "code.cutLineEnd": [], "code.killToWordStart": [], "code.killToWordEnd": [], "code.hungryBackspace": [], "editor.swapSelectionBoundaries": [], "editor.toggleStickySelection": [], "code.moveLineUp": ["Alt+Up"], "code.moveLineDown": ["Alt+Down"], "code.moveStatementUp": [], "code.moveStatementDown": [], "code.completeStatement": [], "code.surroundWith": [], "code.insertLiveTemplate": [], "code.fold": ["Meta+Alt+["], "code.unfold": ["Meta+Alt+]"], "code.foldAll": ["Meta+K Meta+0"], "code.collapseRecursively": ["Meta+K Meta+["], "code.expandRecursively": ["Meta+K Meta+]"], "code.expandDocComments": [], "code.collapseDocComments": [], "code.unfoldAll": ["Meta+K Meta+J"], "code.addCaretNextOccurrence": ["Meta+D"], "code.selectAllOccurrences": ["Meta+Shift+L"], "code.unselectOccurrence": ["Meta+U"], "code.addCaretsToLineEnds": ["Alt+Shift+I"], "editor.selectLine": [], "code.startNewLine": ["Meta+Enter"], "code.startNewLineBefore": ["Meta+Shift+Enter"], "code.joinLines": ["Ctrl+J"], "code.toggleCase": [], "code.transpose": [], "code.cycleCase": [], "code.pasteFromHistory": [], "code.sortLines": [], "code.reverseLines": [], "code.uniqueLines": [], "code.fillParagraph": [], "code.convertIndentsToSpaces": [], "code.convertIndentsToTabs": [], "code.unwrap": [], "code.foldSelection": [], "editor.toggleColumnSelection": [], // Refactor "refactor.thisMenu": ["Ctrl+Shift+R"], "refactor.rename": ["F2"], "refactor.changeSignature": [], "refactor.extractVariable": [], "refactor.extractMethod": [], "refactor.extractConstant": [], "refactor.extractField": [], "refactor.extractParameter": [], "refactor.inline": [], "refactor.move": [], "refactor.safeDelete": [], "refactor.extractInterface": [], "refactor.extractTypeAlias": [], "refactor.pullMembersUp": [], "refactor.pushMembersDown": [], // File / editor tabs "file.save": ["Meta+S"], "file.saveAs": ["Meta+Shift+S"], "file.newUntitled": ["Meta+N"], "file.new": [], "file.settings": ["Meta+,"], "file.projectStructure": [], "file.openProject": ["Meta+O"], "file.newScratchFile": [], "file.newScratchBuffer": [], "editor.closeTab": ["Meta+W"], "toolwindow.closeContent": ["Meta+W"], "editor.reopenClosedTab": ["Meta+Shift+T"], "editor.closeUnmodifiedTabs": [], "editor.closeAllButPinned": [], "editor.closeTabsToLeft": [], "editor.closeTabsToRight": [], "editor.closeReadOnlyTabs": [], "file.toggleReadOnly": [], "editor.nextTab": ["Meta+Alt+Right", "Meta+Shift+]"], "editor.prevTab": ["Meta+Alt+Left", "Meta+Shift+["], "editor.splitRight": ["Meta+\\"], "editor.splitAndMoveRight": [], "editor.splitAndMoveDown": [], "editor.toggleZen": ["Meta+K Z"], "view.toggleZenMode": [], "editor.toggleLineNumbers": [], "editor.toggleIndentGuides": [], "editor.toggleStickyLines": [], "editor.toggleWhitespaces": [], "editor.toggleLocalLineNumbers": [], "editor.toggleLocalWhitespaces": [], "editor.toggleLocalGutterIcons": [], "editor.toggleLocalIndentGuides": [], "window.toggleFullScreen": ["Meta+Ctrl+F"], // Project window groups are an IntelliJ concept; VS Code has no counterpart. "window.nextTab": [], "window.previousTab": [], "window.next": [], "window.previous": [], "file.reloadFromDisk": [], "editor.copyPath": ["Meta+K P"], "navigate.searchText": [], "code.splitLine": [], "editor.scrollToCenter": [], "editor.scrollUp": [], "editor.scrollDown": [], "editor.scrollLeft": [], "editor.scrollRight": [], "editor.scrollUpAndMove": [], "editor.scrollDownAndMove": [], "editor.moveUpAndScroll": [], "editor.moveDownAndScroll": [], "editor.moveUpAndScrollWithSelection": [], "editor.moveDownAndScrollWithSelection": [], "editor.scrollToTop": [], "editor.scrollToBottom": [], "editor.moveToPageTop": [], "editor.moveToPageBottom": [], "editor.moveToPageTopWithSelection": [], "editor.moveToPageBottomWithSelection": [], "editor.codeBlockStart": [], "editor.codeBlockEnd": [], "editor.paragraphForward": [], "editor.paragraphBackward": [], "editor.paragraphForwardWithSelection": [], "editor.paragraphBackwardWithSelection": [], "editor.nextWordInDifferentHumpsMode": [], "editor.previousWordInDifferentHumpsMode": [], "editor.nextWordInDifferentHumpsModeWithSelection": [], "editor.previousWordInDifferentHumpsModeWithSelection": [], "code.deleteToWordStartInDifferentHumpsMode": [], "code.deleteToWordEndInDifferentHumpsMode": [], "editor.cloneCaretAbove": ["Meta+Alt+Up"], "editor.cloneCaretBelow": ["Meta+Alt+Down"], "editor.matchBrace": ["Meta+Shift+\\"], "editor.toggleInsertState": [], // Explorer (when: projectViewFocus) "project.newFile": [], "project.newInThisDirectory": [], "project.rename": ["Enter"], "project.move": [], "project.delete": ["Meta+Backspace"], "project.copy": ["Meta+C"], "project.cut": ["Meta+X"], "project.paste": ["Meta+V"], "project.copyAbsolutePath": ["Meta+Alt+C"], "project.open": ["Meta+Down"], "project.quickPreview": ["Space"], // Explorer: Open to the Side. "project.openInRightSplit": ["Meta+Enter"], "project.reloadFromDisk": [], "project.expandAll": [], "project.collapseAll": [], "run.expandAllTests": [], "run.collapseAllTests": [], "project.findUsages": ["Alt+Shift+F12"], "project.reformatCode": ["Alt+Shift+F"], "project.optimizeImports": ["Alt+Shift+O"], "project.compareWith": [], "diff.compareFileWithEditor": [], // Views / panels "toolwindow.project": ["Meta+Shift+E"], "toolwindow.bookmarks": [], "toolwindow.find": [], "toolwindow.run": [], "toolwindow.debug": ["Meta+Shift+D"], "toolwindow.problems": ["Meta+Shift+M"], "toolwindow.structure": [], "toolwindow.services": [], "toolwindow.git": ["Ctrl+Shift+G"], "toolwindow.commit": [], "toolwindow.terminal": ["Ctrl+`"], "terminal.new": [], "terminal.runHighlightedCommand": ["Meta+Enter"], "toolwindow.hideAll": ["Meta+B"], "toolwindow.maximize": [], "toolwindow.jumpToLast": [], "toolwindow.hideActive": ["Meta+J"], "toolwindow.hideSide": [], "toolwindow.focusEditor": ["Escape"], // Build (Terminal › Run Build Task) "build.buildProject": ["Meta+Shift+B"], "build.buildModule": [], "build.compileFile": [], "build.rebuildProject": [], "build.buildArtifacts": [], // Run / debug "run.run": ["Ctrl+F5"], "run.debug": ["F5"], "run.runContext": [], "run.debugContext": [], "run.stop": ["Shift+F5"], "run.chooseConfig": [], "run.editConfigs": [], "run.updateApplication": [], "run.rerun": [], "coverage.manageReports": [], "web.openInBrowser": [], "debug.toggleBreakpoint": ["F9"], "debug.toggleBreakpointEnabled": [], "debug.viewBreakpoints": [], "debug.removeAllBreakpoints": [], "debug.removeAllBreakpointsInFile": [], "debug.resume": ["F5"], "debug.stepOver": ["F10"], "debug.stepInto": ["F11"], "debug.stepOut": ["Shift+F11"], "debug.runToCursor": [], "debug.forceRunToCursor": [], "debug.forceStepOver": [], "debug.forceStepInto": [], "debug.smartStepInto": [], "debug.showExecutionPoint": [], "debug.toggleTemporaryBreakpoint": [], "debug.attachToProcess": [], "debug.setValue": ["F2"], "debug.jumpToSource": [], "debug.evaluate": [], "debug.rerun": [], "find.rerun": [], "usages.rerun": [], // VCS "vcs.operations": [], "vcs.commit": [], "vcs.push": [], "vcs.commitAndPush": [], "vcs.toggleAmend": [], "vcs.showMessageHistory": [], "vcs.update": [], "vcs.rollback": [], "vcs.addToVcs": [], "vcs.showDiff": [], "vcs.log.changes.showDiff": [], "vcs.showDiffInNewWindow": [], "vcs.nextChange": ["Alt+F5"], "vcs.prevChange": ["Alt+Shift+F5"], "vcs.branches": [], "vcs.newBranch": [], "vcs.annotate": [], "vcs.localHistory": [], "localHistory.recentChanges": [], "runAnything.show": [], "view.quickSwitchScheme": [], // Commit tool window (change lists) and Git log; keyWhen limits them to those tool windows. "vcs.changelist.move": [], "vcs.shelveSilently": [], "vcs.unshelveSilently": [], "vcs.changelist.edit": [], "vcs.log.copyRevision": [], "vcs.log.maximizeCommitMessage": [], "vcs.log.refresh": [], "vcs.log.focusTextFilter": [], "vcs.log.copyCommitSubject": [], "vcs.log.goToRef": [], "vcs.log.editMessage": [], "vcs.log.newBranch": [], "vcs.log.goToChild": [], "vcs.log.goToParent": [], "vcs.log.toggleBookmark": [], "vcs.log.toggleBookmarkWithMnemonic": [], // View › Appearance (VS Code: workbench.action.zoomIn / zoomOut / zoomReset) "view.zoomIn": ["Meta+="], "view.zoomOut": ["Meta+-"], "view.resetZoom": [], "editor.increaseFontSize": [], "editor.decreaseFontSize": [], "editor.increaseFontSizeAll": [], "editor.decreaseFontSizeAll": [], // Editing extras, image viewer (keyWhen: image focused) and Markdown editor layouts "code.cyclicExpandWord": [], "code.cyclicExpandWordBackward": [], "editor.copyReference": [], "editor.copyPathReference": [], "code.pasteAsPlainText": [], "code.copyAsPlainText": [], "code.copyAsRichText": [], "code.expressionTypeInfo": [], "code.implementMethods": [], "code.overrideMethods": [], "image.zoomIn": [], "image.zoomOut": [], "image.actualSize": [], "image.fitToWindow": [], "image.toggleChessboard": [], "markdown.editorOnly": [], "markdown.editorAndPreview": ["Meta+K V"], "markdown.previewOnly": ["Meta+Shift+V"], // Diff editor (VS Code: workbench.action.compareEditor.nextChange / previousChange) "diff.nextDifference": ["F7"], "diff.applyLeftSide": [], "diff.applyRightSide": [], "diff.nextFile": [], "diff.prevFile": [], "diff.showSettings": [], "diff.focusOppositePane": [], "diff.prevDifference": ["Shift+F7"], "diff.jumpToSource": [], // HTTP Client / Database console: run the request or statement at the caret. "http.runRequest": ["Meta+Enter"], "graphql.runQuery": ["Meta+Enter"], "http.runAll": [], "db.toggleBooleanCell": ["Space"], "db.setCellNull": ["Meta+Backspace"], "db.setCellDefault": ["Meta+Shift+Backspace"], "db.reformatValue": ["Alt+Shift+F"], "db.openValueWindow": [], "db.findInValue": ["Meta+F"], "db.execute": ["Meta+Enter"], "db.nextResultTab": ["Meta+Alt+Right", "Meta+Shift+]"], "db.previousResultTab": ["Meta+Alt+Left", "Meta+Shift+["], "db.showToolWindow": [], // Database tool window (when the tree has focus). "db.openConsole": [], "db.newDataSource": [], "db.new": [], "services.addService": [], "github.createPullRequest": [], "github.refresh": [], "github.pullRequest.refresh": [], "github.pullRequest.timeline.refresh": [], "github.pullRequest.toggleViewed": [], "db.properties": [], "db.refresh": [], "db.disconnect": [], "db.jumpToConsole": [], "db.editData": ["F4"], "db.goToDdl": ["F12"], "db.quickDoc": ["Meta+K Meta+I"], "db.rename": ["F2"], "db.drop": ["Meta+Backspace"], "db.truncate": [], "db.modifyTable": [], "db.newTable": [], "db.newColumn": [], "db.copyReference": ["Meta+Alt+Shift+C"], "db.duplicateSource": [], "db.ddlToClipboard": [], "db.ddlToConsole": [], "db.runSqlScript": [], "db.sqlScript": [], "db.goToReferencedTable": [], "db.showDiagram": [], "db.showDiagramPopup": [], "db.selectOpened": [], "db.expandAll": [], "db.collapseAll": [], // Find in Files popup (findPopupOpen): after the editor's keys, so these win while it is open. "find.popup.nextResult": ["Meta+G"], "find.popup.previousResult": ["Meta+Shift+G"], "find.popup.openResult": [], "find.popup.recentSearches": ["Alt+Down"], // Agents (VS Code's chat: ⇧⌘I) "agents.newTask": ["Meta+Shift+I"], "agents.focusInput": ["Meta+L"], "agents.cycleEffort": ["Alt+T"], "agents.showToolWindow": [], "agents.sendToAgent": [], // Agents task list (when it has focus) "agents.archiveTasks": ["Meta+Shift+E"], "agents.deleteTasks": ["Meta+Backspace"], // Python Console: VS Code's Shift+Enter would shadow typing in Python files, so unbound. "python.console.executeSelection": [], // Search fields (find bar, Find in Files): last, so they win over editor keys while one is focused. "find.openInWindow": ["Alt+F7"], "find.field.newLine": ["Meta+Shift+Enter"], "find.field.recentSearches": ["Alt+Down"], "editor.pasteHistory.paste": ["Enter"], "editor.pasteHistory.remove": ["Delete", "Backspace"], };