Skip to content

Key bindings

Predefined keymaps

We have a growing collection of pre-defined keymaps in our keymaps repository.

Custom key bindings

Accessing custom key bindings

You can open keymap.json via CMD + K, CMD + S, the command palette, or the Zed > Settings > Open Key Bindings application menu item.

Adding a custom key binding

To customize key bindings, specify a context and the list of bindings to set. Re-mapping an existing binding will clobber the existing binding in favor of the custom one.

An example of adding a set of custom key bindings:

[
{
"context": "Editor",
"bindings": {
"ctrl-w": "editor::SelectLargerSyntaxNode",
"ctrl-shift-W": "editor::SelectSmallerSyntaxNode",
"ctrl-c": "editor::Cancel"
}
}
]

You can see more examples in Zed’s default.json.

All key bindings

Global

CommandTargetDefault Shortcut
Open recentBranchesAlt + Command + B
Toggle focusCollab PanelCommand + Shift + C
Toggle inlay hintsEditorControl + :
CancelMenuControl + C
CancelMenuEscape
ConfirmMenuEnter
Secondary confirmMenuCommand + Enter
Select firstMenuCommand + Up
Select firstMenuPage Up
Select firstMenuShift + Page Down
Select firstMenuShift + Page Up
Select lastMenuCommand + Down
Select lastMenuPage Down
Select nextMenuControl + N
Select nextMenuDown
Select prevMenuControl + P
Select prevMenuUp
Show context menuMenuControl + Enter
Activate next itemPaneAlt + Command + Right
Activate next itemPaneCommand + }
Activate prev itemPaneAlt + Command + Left
Activate prev itemPaneCommand + {
Close active itemPaneCommand + W
Close all itemsPaneCommand + K, Command + W
Close clean itemsPaneCommand + K, U
Close inactive itemsPaneAlt + Command + T
Open recentProjectsAlt + Command + O
Toggle focusTerminal PanelControl + `
Activate pane in direction downWorkspaceCommand + K, Command + Down
Activate pane in direction leftWorkspaceCommand + K, Command + Left
Activate pane in direction rightWorkspaceCommand + K, Command + Right
Activate pane in direction upWorkspaceCommand + K, Command + Up
Close inactive tabs and panesWorkspaceControl + Alt + Command + W
Close windowWorkspaceCommand + Shift + W
Follow next collaboratorWorkspaceControl + Alt + Command + F
New fileWorkspaceCommand + N
New terminalWorkspaceControl + ~
New windowWorkspaceCommand + Shift + N
OpenWorkspaceCommand + O
SaveWorkspaceCommand + S
Save asWorkspaceCommand + Shift + S
Swap pane in directionWorkspaceCommand + K, Shift + Down
Swap pane in directionWorkspaceCommand + K, Shift + Left
Swap pane in directionWorkspaceCommand + K, Shift + Right
Swap pane in directionWorkspaceCommand + K, Shift + Up
Toggle zoomWorkspaceShift + Escape
Debug elementsZedCommand + Alt + I
Decrease buffer font sizeZedCommand +
HideZedCommand + H
Hide othersZedAlt + Command + H
Increase buffer font sizeZedCommand + +
Increase buffer font sizeZedCommand + =
MinimizeZedCommand + M
Open settingsZedCommand + ,
QuitZedCommand + Q
Reset buffer font sizeZedCommand + 0
Toggle full screenZedControl + Command + F

Editor

CommandTargetDefault Shortcut
Inline assistAssistantControl + Enter
Add selection aboveEditorCommand + Alt + Up
Add selection aboveEditorCommand + Control + P
Add selection belowEditorCommand + Alt + Down
Add selection belowEditorCommand + Control + N
BackspaceEditorBackspace
BackspaceEditorControl + H
BackspaceEditorShift + Backspace
CancelEditorEscape
Confirm code actionEditorEnter
Confirm completionEditorEnter
Confirm completionEditorTab
Confirm renameEditorEnter
Context menu firstEditorPage Up
Context menu lastEditorPage Down
Context menu nextEditorControl + N
Context menu nextEditorDown
Context menu prevEditorControl + P
Context menu prevEditorUp
CopyEditorCommand + C
CutEditorCommand + X
Cut to end of lineEditorControl + K
DeleteEditorControl + D
DeleteEditorDelete
Delete lineEditorControl + Shift + K
Delete to beginning of lineEditorCommand + Backspace
Delete to end of lineEditorCommand + Delete
Delete to next subword endEditorControl + Alt + D
Delete to next subword endEditorControl + Alt + Delete
Delete to next word endEditorAlt + D
Delete to next word endEditorAlt + Delete
Delete to previous subword startEditorControl + Alt + Backspace
Delete to previous subword startEditorControl + Alt + H
Delete to previous word startEditorAlt + Backspace
Delete to previous word startEditorAlt + H
Duplicate lineEditorCommand + Shift + D
Find all referencesEditorAlt + Shift + F12
FoldEditorAlt + Command + [
FormatEditorCommand + Shift + I
Go to definitionEditorF12
Go to definition splitEditorAlt + F12
Go to diagnosticEditorF8
Go to hunkEditorCommand + F8
Go to prev diagnosticEditorShift + F8
Go to prev hunkEditorCommand + Shift + F8
Go to type definitionEditorCommand + F12
Go to type definition splitEditorAlt + Command + F12
HoverEditorCommand + K, Command + I
IndentEditorCommand + ]
Join linesEditorControl + J
Move downEditorControl + N
Move downEditorDown
Move leftEditorControl + B
Move leftEditorLeft
Move line downEditorControl + Command + Down
Move line upEditorControl + Command + Up
Move page downEditorControl + V
Move page downEditorShift + Page Down
Move page upEditorAlt + V
Move page upEditorShift + Page Up
Move rightEditorControl + F
Move rightEditorRight
Move to beginningEditorCommand + Up
Move to beginning of lineEditorCommand + Left
Move to beginning of lineEditorControl + A
Move to beginning of lineEditorHome
Move to enclosing bracketEditorControl + M
Move to endEditorCommand + Down
Move to end of lineEditorCommand + Right
Move to end of lineEditorControl + E
Move to end of lineEditorEnd
Move to end of paragraphEditorControl + Down
Move to next subword endEditorControl + Alt + F
Move to next subword endEditorControl + Alt + Right
Move to next word endEditorAlt + F
Move to next word endEditorAlt + Right
Move to previous subword startEditorControl + Alt + B
Move to previous subword startEditorControl + Alt + Left
Move to previous word startEditorAlt + B
Move to previous word startEditorAlt + Left
Move to start of paragraphEditorControl + Up
Move upEditorControl + P
Move upEditorUp
Next screenEditorControl + L
Open excerptsEditorAlt + Enter
OutdentEditorCommand + [
Page downEditorPage Down
Page upEditorPage Up
PasteEditorCommand + V
RedoEditorCommand + Shift + Z
Redo selectionEditorCommand + Shift + U
RenameEditorF2
Reveal in finderEditorAlt + Command + R
Select allEditorCommand + A
Select all matchesEditorCommand + Shift + L
Select downEditorControl + Shift + N
Select downEditorShift + Down
Select larger syntax nodeEditorAlt + Up
Select leftEditorControl + Shift + B
Select leftEditorShift + Left
Select lineEditorCommand + L
Select nextEditorCommand + D
Select nextEditorCommand + K, Command + D
Select previousEditorCommand + K, Control + Command + D
Select previousEditorControl + Command + D
Select rightEditorControl + Shift + F
Select rightEditorShift + Right
Select smaller syntax nodeEditorAlt + Down
Select to beginningEditorCommand + Shift + Up
Select to beginning of lineEditorCommand + Shift + Left
Select to beginning of lineEditorControl + Shift + A
Select to beginning of lineEditorShift + Home
Select to endEditorCommand + Shift + Down
Select to end of lineEditorCommand + Shift + Right
Select to end of lineEditorControl + Shift + E
Select to end of lineEditorShift + End
Select to end of paragraphEditorControl + Shift + Down
Select to next subword endEditorControl + Alt + Shift + F
Select to next subword endEditorControl + Alt + Shift + Right
Select to next word endEditorAlt + Shift + F
Select to next word endEditorAlt + Shift + Right
Select to previous subword startEditorControl + Alt + Shift + B
Select to previous subword startEditorControl + Alt + Shift + Left
Select to previous word startEditorAlt + Shift + B
Select to previous word startEditorAlt + Shift + Left
Select to start of paragraphEditorControl + Shift + Up
Select upEditorControl + Shift + P
Select upEditorShift + Up
Show character paletteEditorControl + Command + Space
Show completionsEditorControl + Space
TabEditorTab
Tab prevEditorShift + Tab
Toggle code actionsEditorCommand + .
Toggle commentsEditorCommand + /
TransposeEditorControl + T
UndoEditorCommand + Z
Undo selectionEditorCommand + U
Unfold linesEditorAlt + Command + ]

Editor (Full Only)

CommandTargetDefault Shortcut
Quote selectionAssistantCommand + >
DeployBuffer SearchCommand + E
DeployBuffer SearchCommand + F
Next suggestionCopilotAlt + ]
Previous suggestionCopilotAlt + [
SuggestCopilotAlt + \
NewlineEditorEnter
NewlineEditorShift + Enter
Newline aboveEditorCommand + Shift + Enter
Newline belowEditorCommand + Enter
Toggle soft wrapEditorAlt + Z
ToggleGo To LineControl + G
ToggleOutlineCommand + Shift + O

Editor (Auto Height Only)

CommandTargetDefault Shortcut
NewlineEditorControl + Enter
Newline belowEditorControl + Shift + Enter

Pane

CommandTargetDefault Shortcut
Activate item 1PaneControl + 1
Activate item 2PaneControl + 2
Activate item 3PaneControl + 3
Activate item 4PaneControl + 4
Activate item 5PaneControl + 5
Activate item 6PaneControl + 6
Activate item 7PaneControl + 7
Activate item 8PaneControl + 8
Activate item 9PaneControl + 9
Activate last itemPaneControl + 0
Go backPaneControl +
Go forwardPaneControl + _
Reopen closed itemPaneCommand + Shift + T
Split downPaneCommand + K, Down
Split leftPaneCommand + K, Left
Split rightPaneCommand + K, Right
Split upPaneCommand + K, Up
Toggle filtersProject SearchAlt + Command + F
Toggle focusProject SearchCommand + F
Toggle focusProject SearchCommand + Shift + F
Activate regex modeSearchAlt + Command + G
Activate semantic modeSearchAlt + Command + S
Activate text modeSearchAlt + Command + X
Cycle modeSearchAlt + Tab
Select all matchesSearchAlt + Enter
Select next matchSearchCommand + G
Select prev matchSearchCommand + Shift + G
Toggle case sensitiveSearchAlt + Command + C
Toggle replaceSearchCommand + Shift + H
Toggle whole wordSearchAlt + Command + W
CommandTargetDefault Shortcut
DismissBuffer SearchEscape
Focus editorBuffer SearchTab
Cycle modeSearchAlt + Tab
Next history querySearchDown
Previous history querySearchUp
Replace allSearchCommand + Enter
Replace nextSearchEnter
Select all matchesSearchAlt + Enter
Select next matchSearchEnter
Select prev matchSearchShift + Enter

Workspace

CommandTargetDefault Shortcut
Toggle focusAssistantCommand + ?
ToggleCommand PaletteCommand + Shift + P
DeployDiagnosticsCommand + Shift + M
ToggleFile FinderCommand + P
ToggleLanguage SelectorCommand + K, M
Toggle focusProject PanelCommand + Shift + E
ToggleProject SymbolsCommand + T
ToggleTheme SelectorCommand + K, Command + T
Activate pane 1WorkspaceCommand + 1
Activate pane 2WorkspaceCommand + 2
Activate pane 3WorkspaceCommand + 3
Activate pane 4WorkspaceCommand + 4
Activate pane 5WorkspaceCommand + 5
Activate pane 6WorkspaceCommand + 6
Activate pane 7WorkspaceCommand + 7
Activate pane 8WorkspaceCommand + 8
Activate pane 9WorkspaceCommand + 9
Close all docksWorkspaceAlt + Command + Y
New searchWorkspaceCommand + Shift + F
Save allWorkspaceCommand + Alt + S
Toggle bottom dockWorkspaceCommand + J
Toggle left dockWorkspaceCommand + B
Toggle right dockWorkspaceCommand + R
Open keymapZedCommand + K, Command + S

Project Panel

CommandTargetDefault Shortcut
Collapse selected entryProject PanelLeft
CopyProject PanelCommand + C
Copy pathProject PanelCommand + Alt + C
Copy relative pathProject PanelAlt + Command + Shift + C
CutProject PanelCommand + X
DeleteProject PanelBackspace
Expand selected entryProject PanelRight
New directoryProject PanelAlt + Command + N
New fileProject PanelCommand + N
New search in directoryProject PanelAlt + Shift + F
OpenProject PanelSpace
PasteProject PanelCommand + V
RenameProject PanelEnter
RenameProject PanelF2
Reveal in finderProject PanelAlt + Command + R
CommandTargetDefault Shortcut
Search in newProject SearchCommand + Enter
Toggle focusProject SearchEscape
Activate regex modeSearchAlt + Command + G
Activate semantic modeSearchAlt + Command + S
Activate text modeSearchAlt + Command + X
Cycle modeSearchAlt + Tab
Next history querySearchDown
Previous history querySearchUp
Replace allSearchCommand + Enter
Replace nextSearchEnter
Toggle replaceSearchCommand + Shift + H

Terminal

CommandTargetDefault Shortcut
ClearTerminalCommand + K
CopyTerminalCommand + C
Delete lineTerminalCommand + Backspace
Move to beginning of lineTerminalCommand + Left
Move to end of lineTerminalCommand + Right
Move to next word endTerminalAlt + Right
Move to previous word startTerminalAlt + Left
PasteTerminalCommand + V
Show character paletteTerminalControl + Command + Space

Assistant Editor

CommandTargetDefault Shortcut
AssistAssistantCommand + Enter
Cycle message roleAssistantControl + R
Quote selectionAssistantCommand + >
SplitAssistantShift + Enter
SaveWorkspaceCommand + S