Skip to content

Chat Bindings

Keybindings active when the chat input field is focused. This is the largest context, covering prompt entry, submission, history, editing, and mode toggles.

Chat bindings handle the primary interaction loop: entering prompts, submitting, navigating history, managing sessions, and toggling model options. These are active whenever the prompt input is focused.

KeyActionDescription
enterchat:submitSubmit the current prompt. Sends input to Claude.
escapechat:cancelCancel/clear the current prompt without submitting.
ctrl+x ctrl+kchat:killAgentsKill all running agents (kill chord; avoids shadowing ctrl+a/b/e/f readline keys).
KeyActionDescriptionPlatform
shift+tabchat:cycleModeCycle editor mode (normal → raw → smart/multi-line).Windows 24.2+, macOS, Linux
meta+mchat:cycleModeCycle editor mode fallback (for Windows <24.2 without VT mode).Windows <24.2
meta+pchat:modelPickerOpen model selection dialog.All
meta+ochat:fastModeToggle fast/draft mode. Quick, lower-accuracy responses.All
meta+tchat:thinkingToggleToggle extended thinking (Claude 3.5 Sonnet feature).All
KeyActionDescription
uphistory:previousCycle to previous prompt in history.
downhistory:nextCycle to next prompt in history.

When navigating history, the current input is preserved on a temporary “draft” line. Pressing up/down cycles through submitted prompts; exiting history restores your draft.

KeyActionDescriptionNote
ctrl+_chat:undoUndo last edit. Uses legacy terminal control char (\x1f).Traditional; widely supported
ctrl+shift+-chat:undoUndo last edit (Kitty protocol variant). Uses physical minus key.Kitty-protocol terminals only

Both bindings are registered; your terminal determines which one works. Most terminals support ctrl+_.

KeyActionDescriptionNote
ctrl+x ctrl+echat:externalEditorOpen prompt in external editor ($EDITOR). Supports chord sequence.Standard readline binding
ctrl+gchat:externalEditorAlternative shortcut for external editor (single key).Convenient alias

Both work; choose whichever is easier to remember.

KeyActionDescriptionPlatform
alt+vchat:imagePastePaste images from clipboard into prompt.Windows
ctrl+vchat:imagePastePaste images from clipboard into prompt.macOS, Linux

Platform-specific because Windows Terminal uses Ctrl+V for system paste; Claude Code intercepts Alt+V instead.

KeyActionDescription
ctrl+schat:stashSave current prompt to stash (temporary storage). Retrieve later without scrolling history.

Stashed prompts are stored per-session and cleared when the session ends.

Requires: MESSAGE_ACTIONS feature flag.

KeyActionDescription
shift+upchat:messageActionsOpen action menu on previous message. Navigate, edit, retry, copy, or delete.

Requires: VOICE_MODE feature flag.

KeyActionDescription
spacevoice:pushToTalkHold to record voice input. Release to stop and submit.

Important: Space is only bound to voice if the feature is enabled. Otherwise, space emits a literal space character in the prompt.

If you want to use a different key for voice, add to keybindings.json:

{
"Chat": {
"ctrl+alt+v": "voice:pushToTalk"
}
}

This overrides the default space binding. To disable voice entirely, set space to null:

{
"Chat": {
"space": null
}
}

However, Claude Code provides a /voice command as the canonical way to enable/disable voice. Null-unbinding space in custom bindings causes space to be “swallowed” (not emitted) due to a pre-existing trap in the keybinding handler—use /voice instead to toggle the feature safely.

By default, use Shift+Tab. If that conflicts with your terminal, override:

{
"Chat": {
"ctrl+alt+m": "chat:cycleMode"
}
}
{
"Chat": {
"ctrl+m": "chat:modelPicker"
}
}
{
"Chat": {
"ctrl+alt+f": "chat:fastMode"
}
}
  • ctrl+x ctrl+k uses a two-step chord to avoid shadowing ctrl+a (line start), ctrl+b (back char), ctrl+e (line end), ctrl+f (forward char), etc. These readline bindings are handled by your shell, not Claude Code.
  • ctrl+x ctrl+e is the readline standard for “edit and execute command,” familiar to bash/zsh users.
  • External editor: Requires $EDITOR environment variable. Default editors: nano, vi, emacs, code.
  • Undo: Two bindings provided for terminal compatibility. Try ctrl+_ first; if it doesn’t work, your terminal might need ctrl+shift+-.
  • Image paste: Automatically uses the correct binding per platform. Some terminals (WezTerm, iTerm2) may have additional clipboard handling.
  • Up arrow in empty prompt: If your prompt is empty, up arrow goes to the most recent history item. If you’ve typed text, up arrow searches history for prompts starting with that text.
  • Draft line: While navigating history, your current unsaved prompt is preserved. Pressing down after reaching the end returns to your draft.

← Back to Keybindings/README.md