Skip to content
cccskills
FreePublished on GitHub

keybindings-help

Customize Claude Code keyboard shortcuts while preserving existing settings. Change submission keys, add chords—shortcuts entered as a sequence of keystrokes—and remove default bindings, with checks for invalid settings and terminal or operating system conflicts.

OriginalShow the original description

Use when the user wants to customize keyboard shortcuts, rebind keys, add chord bindings, or modify ~/.claude/keybindings.json. Examples: "rebind ctrl+s", "add a chord shortcut", "change the submit key", "customize keybindings".

See how to install

Good for

  • Change the shortcut for opening an external editor
  • Add a shortcut entered as a sequence of keystrokes
  • Change the key used to submit chat messages
  • Check shortcut settings for errors and conflicts

Files included (1)

  • SKILL.md14.9 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Keybindings Skill

Create or modify ~/.claude/keybindings.json to customize keyboard shortcuts.

CRITICAL: Read Before Write

Always read ~/.claude/keybindings.json first (it may not exist yet). Merge changes with existing bindings — never replace the entire file.

  • Use Edit tool for modifications to existing files
  • Use Write tool only if the file does not exist yet

File Format

{
  "$schema": "https://www.schemastore.org/claude-code-keybindings.json",
  "$docs": "https://code.claude.com/docs/en/keybindings",
  "bindings": [
    {
      "context": "Chat",
      "bindings": {
        "ctrl+e": "chat:externalEditor"
      }
    }
  ]
}

Always include the $schema and $docs fields.

Keystroke Syntax

Modifiers (combine with +):

  • ctrl (alias: control)
  • alt (aliases: opt, option) — note: alt and meta are identical in terminals
  • shift
  • meta — same key as alt in terminals (Option key on macOS)
  • cmd (aliases: command, super, win) — Command key on macOS, Windows key on Windows, Super key on Linux; not the same as meta. Most terminals never send it (only ones that report the Super modifier, such as through the Kitty keyboard protocol or xterm modifyOtherKeys), so prefer ctrl for bindings that should work everywhere

Special keys: escape/esc, enter/return, tab, space, backspace, delete, up, down, left, right

Chords: Space-separated keystrokes, e.g. ctrl+k ctrl+s (3-second timeout between keystrokes)

Examples: ctrl+shift+p, alt+enter, ctrl+k ctrl+n

Unbinding Default Shortcuts

Set a key to null to remove its default binding:

{
  "context": "Chat",
  "bindings": {
    "ctrl+s": null
  }
}

How User Bindings Interact with Defaults

  • User bindings are additive — they are appended after the default bindings
  • To move a binding to a different key: unbind the old key (null) AND add the new binding
  • A context only needs to appear in the user's file if they want to change something in that context

Common Patterns

Rebind a key

To change the external editor shortcut from ctrl+g to ctrl+e:

{
  "context": "Chat",
  "bindings": {
    "ctrl+g": null,
    "ctrl+e": "chat:externalEditor"
  }
}

Add a chord binding

{
  "context": "Global",
  "bindings": {
    "ctrl+k ctrl+t": "app:toggleTodos"
  }
}

Behavioral Rules

  1. Only include contexts the user wants to change (minimal overrides)
  2. Validate that actions and contexts are from the known lists below
  3. Warn the user proactively if they choose a key that conflicts with reserved shortcuts or common tools like tmux (ctrl+b) and screen (ctrl+a)
  4. When adding a new binding for an existing action, the new binding is additive (existing default still works unless explicitly unbound)
  5. To fully replace a default binding, unbind the old key AND add the new one

Validation

Claude Code validates ~/.claude/keybindings.json when it loads; warnings go to the debug log. After editing the file, re-check it against the rules below and fix anything that matches.

Common Issues and Fixes

IssueCauseFix
keybindings.json must have a "bindings" arrayMissing wrapper objectWrap bindings in { "bindings": [...] }
"bindings" must be an arraybindings is not an arraySet "bindings" to an array: [{ context: ..., bindings: ... }]
Unknown context "X"Typo or invalid context nameUse exact context names from the Available Contexts table
"X" is not a modifier, so "Y" ... applies to "Z" insteadError: X comes before the key in Y but is not a modifier (a typo such as ctl for ctrl, or two keys joined with + instead of a space), so it is dropped and the binding applies to ZCorrect the modifier using the Keystroke Syntax list (the message suggests the corrected keystroke when it can), or put a space between the keystrokes of a chord
Duplicate key "X" in Y bindingsSame key defined twice in one contextRemove the duplicate; JSON uses only the last value
"X" may not work: ...Key conflicts with terminal/OS reserved shortcutChoose a different key (see Reserved Shortcuts section)
Invalid action for "X"Action value is not a string or nullActions must be strings like "app:help" or null to unbind

Example validation warnings (debug log)

[keybindings] Found 2 validation issue(s)
[keybindings] [error] Unknown context "chat" — Valid contexts: Global, Chat, Autocomplete, ...
[keybindings] [warning] "ctrl+c" may not work: Terminal interrupt (SIGINT)

Errors prevent bindings from working and must be fixed. Warnings indicate potential conflicts but the binding may still work.

Reserved Shortcuts

Non-rebindable (errors)

  • ctrl+c — Cannot be rebound - used for interrupt/exit (hardcoded)
  • ctrl+d — Cannot be rebound - used for exit (hardcoded)
  • ctrl+m — Cannot be rebound - identical to Enter in terminals (both send CR)
  • ctrl+[ — Cannot be rebound - identical to Escape in terminals
  • ctrl+i — Cannot be rebound - identical to Tab in terminals
  • ctrl+h — Cannot be rebound - identical to Backspace in terminals
  • capslock — Caps Lock is not delivered to terminal applications

Terminal reserved (errors/warnings)

  • ctrl+z — Unix process suspend (SIGTSTP) (may conflict)
  • ctrl+\ — Terminal quit signal (SIGQUIT) (will not work)

macOS reserved (errors)

  • cmd+c — macOS system copy
  • cmd+v — macOS system paste
  • cmd+x — macOS system cut
  • cmd+q — macOS quit application
  • cmd+w — macOS close window/tab
  • cmd+tab — macOS app switcher
  • cmd+space — macOS Spotlight

Available Contexts

ContextDescription
GlobalActive everywhere, regardless of focus
ChatWhen the chat input is focused
AutocompleteWhen autocomplete menu is visible
ConfirmationWhen a confirmation/permission dialog is shown
HelpWhen the help overlay is open
TranscriptWhen viewing the transcript
HistorySearchWhen searching command history (ctrl+r)
TaskWhen a task/agent is running in the foreground
ThemePickerWhen the theme picker is open
SettingsWhen the settings menu is open
TabsWhen tab navigation is active
AttachmentsWhen navigating image attachments in a select dialog
FooterWhen footer indicators are focused
AbovePromptWhen a plugin's panel above the prompt, or a button in it, has keyboard focus
AbovePromptInputWhen a plugin's input field above the prompt has keyboard focus
AbovePromptSelectWhen a plugin's select above the prompt has keyboard focus
PaneWhen a plugin's pane has keyboard focus
PaneFieldWhen an input field or select in a plugin's pane has keyboard focus
MessageSelectorWhen the message selector (rewind) is open
DiffDialogWhen the diff dialog is open
DiffPanelWhen the diff sidebar panel is open
ModelPickerWhen the model picker is open
EffortSliderWhen the effort slider is open
SelectWhen a select/list component is focused
PluginWhen the plugin dialog is open
ScrollWhen a scrollable view is focused (fullscreen layout)
AgentsWhen the agents view (claude agents) is open

Available Actions

ActionDefault Key(s)Context
app:interruptctrl+cGlobal
app:exitctrl+dGlobal
app:toggleTodosctrl+tGlobal
app:toggleTranscriptctrl+oGlobal
app:toggleBriefctrl+shift+bGlobal
app:toggleReplTab(none)Global
app:toggleDiffNoiseFilter(none)Global
app:diffFileListUpctrl+up, meta+upGlobal
app:diffFileListDownctrl+down, meta+downGlobal
app:toggleDiffPreSession(none)Global
app:cycleDiffBasectrl+x bDiffPanel
app:toggleTerminal(none)Global
app:redraw(none)Global
app:openArtifactctrl+]Global
history:searchctrl+rGlobal
history:previousupChat
history:nextdownChat
chat:cancelescapeChat
chat:killAgentsctrl+x ctrl+kChat
chat:cycleModeshift+tabChat
chat:modelPickermeta+pChat
chat:fastModemeta+oChat
chat:defaultToNewerModelctrl+yChat
chat:thinkingTogglemeta+tChat
chat:workflowKeywordTogglemeta+wChat
chat:submitenterChat
chat:queueSubmitctrl+x enterChat
chat:sendNowctrl+x ctrl+s, ctrl+enterChat
chat:newlinectrl+jChat
chat:undoctrl+_, ctrl+-, ctrl+shift+-, ctrl+shift+_Chat
chat:externalEditorctrl+x ctrl+e, ctrl+gChat
chat:stashctrl+sChat
chat:imagePastectrl+vChat
chat:clearInputctrl+lChat
chat:clearScreencmd+kChat
autocomplete:accepttabAutocomplete
autocomplete:dismissescapeAutocomplete
autocomplete:previousupAutocomplete
autocomplete:nextdownAutocomplete
confirm:yesenterConfirmation
confirm:noescape, escapeSettings
confirm:previousupConfirmation
confirm:nextdownConfirmation
confirm:nextFieldtabConfirmation
confirm:previousField(none)Confirmation
confirm:cycleModeshift+tabConfirmation
confirm:togglespaceConfirmation
tabs:nexttab, rightTabs
tabs:previousshift+tab, leftTabs
transcript:toggleShowAllctrl+eTranscript
transcript:exitctrl+c, escape, qTranscript
historySearch:nextctrl+rHistorySearch
historySearch:acceptescape, tabHistorySearch
historySearch:cancelctrl+cHistorySearch
historySearch:executeenterHistorySearch
historySearch:cycleScopectrl+sHistorySearch
task:backgroundctrl+x ctrl+b, ctrl+bTask
theme:toggleSyntaxHighlightingctrl+tThemePicker
theme:editCustomctrl+eThemePicker
help:dismissescapeHelp
attachments:nextrightAttachments
attachments:previousleftAttachments
attachments:removebackspace, deleteAttachments
attachments:exitdown, escapeAttachments
footer:upup, ctrl+pFooter
footer:downdown, ctrl+nFooter
footer:nextrightFooter
footer:previousleftFooter
footer:openSelectedenterFooter
footer:clearSelectionescapeFooter
footer:closexFooter
footer:dismiss(none)Footer
abovePrompt:togglectrl+x ctrl+aChat
abovePrompt:focusctrl+x tabChat
abovePrompt:nexttab, right, tab, down, tab, tabAbovePrompt
abovePrompt:previousshift+tab, left, shift+tab, up, shift+tab, shift+tabAbovePrompt
abovePrompt:pressenter, space, enter, enter, enterAbovePrompt
abovePrompt:leaveescape, escape, escape, escapeAbovePrompt
abovePrompt:highlightNextdownAbovePromptSelect
abovePrompt:highlightPreviousupAbovePromptSelect
pane:scrollUpup, upAbovePrompt
pane:scrollDowndown, downAbovePrompt
pane:pageUppageup, pageupAbovePrompt
pane:pageDownpagedown, pagedownAbovePrompt
pane:tophome, homeAbovePrompt
pane:bottomend, endAbovePrompt
pane:growctrl+x left, ctrl+x upPane
pane:shrinkctrl+x right, ctrl+x downPane
pane:closectrl+x x, ctrl+x xPane
pane:next(none)Pane
pane:previous(none)Pane
diff:dismissescapeDiffDialog
diff:previousSourceleftDiffDialog
diff:nextSourcerightDiffDialog
diff:back(none)DiffDialog
diff:previousFileup, kDiffDialog
diff:nextFiledown, jDiffDialog
modelPicker:decreaseEffortleftModelPicker
modelPicker:increaseEffortrightModelPicker
modelPicker:thisSessionOnlysModelPicker
effortSlider:decreaseEffortleftEffortSlider
effortSlider:increaseEffortrightEffortSlider
effortSlider:toggleUltracodetabEffortSlider
effortSlider:thisSessionOnlysEffortSlider
select:nextdown, j, ctrl+n, down, j, ctrl+nSettings
select:previousup, k, ctrl+p, up, k, ctrl+pSettings
select:pageUppageup, pageupSettings
select:pageDownpagedown, pagedownSettings
select:firsthome, homeSettings
select:lastend, endSettings
select:acceptspace, enter, enterSettings
select:cancelescapeSelect
plugin:togglespacePlugin
plugin:installiPlugin
plugin:favoritefPlugin
plugin:cycleMarketplacectrl+sPlugin
permission:toggleDebug(none)Confirmation
settings:search/Settings
settings:retryrSettings
settings:periodDaydSettings
settings:periodWeekwSettings
settings:sortByTokenstSettings
voice:pushToTalkspaceChat
scroll:pageUppageup, pageupScroll
scroll:pageDownpagedown, pagedownScroll
scroll:lineUpctrl+p, k, up, wheelupTranscript
scroll:lineDownctrl+n, j, down, wheeldownTranscript
scroll:topg, home, ctrl+home, g, homeTranscript
scroll:bottomshift+g, end, ctrl+end, shift+g, endTranscript
scroll:halfPageUpctrl+u, ctrl+uSettings
scroll:halfPageDownctrl+d, ctrl+dSettings
scroll:fullPageUpctrl+b, b, shift+space, bTranscript
scroll:fullPageDownctrl+f, space, spaceTranscript
selection:copyctrl+shift+c, cmd+cScroll
selection:clear(none)Unknown
selection:extendLeftshift+leftScroll
selection:extendRightshift+rightScroll
selection:extendUpshift+upScroll
selection:extendDownshift+downScroll
selection:extendLineStartshift+homeScroll
selection:extendLineEndshift+endScroll
agents:switchViewctrl+sAgents
agents:togglePinctrl+tAgents
agents:findctrl+fAgents
agents:nextGroupctrl+down, meta+downAgents
agents:previousGroupctrl+up, meta+upAgents
agents:renamectrl+rAgents

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

3d-object

FreeSummary

Create a 3D object with three.js, inspect it from every angle in an interactive viewer, and download it as OBJ + MTL or GLB for use in other 3D applications.

  • Create a 3D object and inspect it from every angle
  • Export a model for further editing in Blender
  • Review an object's silhouette and materials
asgeirtj/system_prompts_leaks70KUpdated Oct 20, 2026

action-items

FreeSummary

Maintain a private task list with deadlines, next steps, waiting parties, and blockers. Update progress and dependencies, merge duplicate items, and archive closed tasks so ongoing commitments stay clear and easy to follow.

  • Record tasks and commitments with deadlines
  • Track pending replies and reasons work cannot proceed
  • Update task dependencies when prerequisites are completed
asgeirtj/system_prompts_leaks70KUpdated Oct 20, 2026

agents

FreeSummary

Coordinate a task from a verifiable goal through completion. Handle work directly or split independent tasks across separate agent sessions, track progress, verify results, and arrange pull request merging when included in the goal.

  • Split independent tasks across agents
  • Check progress across ongoing tasks
  • Resume a previously started project
asgeirtj/system_prompts_leaks70KUpdated Oct 20, 2026

animated-video

FreeSummary

Create animated HTML pages with smooth scene transitions and playback controls. An editable timeline lets users adjust scene lengths and speeds, with fixed landscape or portrait layouts prepared for video export.

  • Create an animated product walkthrough
  • Explain a message through moving text and graphics
  • Build a portrait animation for video export
asgeirtj/system_prompts_leaks70KUpdated Oct 20, 2026

apple_healthkit

FreeSummary

Review synced Apple Health records, including steps, heart rate, sleep, and workouts. Retrieve daily summaries or detailed samples for a chosen period, and check sync status and missing data before interpreting the results.

  • Review daily steps and heart rate over time
  • Check sleep stages, duration, and awakenings
  • Review workout duration, distance, and calories
asgeirtj/system_prompts_leaks70KUpdated Oct 20, 2026

Create and edit Word documents and templates, reorganize text, replace images, and work with tracked changes or comments. Apply proper headings and lists, then render every page to check its appearance before delivery.

  • Create a structured Word document
  • Reorganize content in an existing document
  • Replace images or text in a document
asgeirtj/system_prompts_leaks70KUpdated Oct 20, 2026

See all skills by asgeirtj

Report a problem with this skill