跳到主要内容

keybindings-help 精选

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".

在 GitHub 打开

安装方式

cp -r Anthropic/claude-code/skills/keybindings-help ~/.claude/skills/keybindings-help

把该 skill 目录放进客户端 skills 目录。不同客户端的目录可能不同,Claude Code 默认是 ~/.claude/skills/

整仓一次性获取:git clone --depth 1 https://github.com/asgeirtj/system_prompts_leaks.git

依赖与权限

  • 无需 API Key
  • 需要联网访问外部服务
  • 依赖外部命令:go
  • 以上为按正文与 frontmatter 自动推断的信号,仅供参考;安装前建议先阅读原文。
触发场景
rebind keysadd chord bindingsmodify

SKILL.md 正文

来源 asgeirtj/system_prompts_leaks@a09e0e7 · 许可 CC0-1.0 · 内容未修改

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

质量与来源

所属仓库
asgeirtj/system_prompts_leaks
仓库星标
6.9 万
最近更新
今天
采集时间
今天
commit
a09e0e708710
内容指纹
sha256:c0e5fe30478feaf
文件路径
Anthropic/claude-code/skills/keybindings-help/SKILL.md

同仓库其它 Skill

查看全部 48 个
dashboard
Use this for a dashboard, metrics page, KPI tracker, scorecard, data visualization or recurring report: a page or scroll story of charts, numbers and tables of data, whatever the data and wherever it comes from. Read it when creating, filling, refreshing or revising one. You write datasets (a live query on a connector, or an attached CSV/TSV/JSON file), then the page as plain HTML, in the dashboard's own store.
精选 asgeirtj/system_prompts_leaks 6.9 万 原文
Claude CodeCodex CLICursor
design-system
How to create and revise a design system made from the Design System appifact type: its files under project/, the exact shapes and size caps, the order to write in, how to change one later, and the checklist.
精选 asgeirtj/system_prompts_leaks 6.9 万 原文
Claude CodeCodex CLICursor
design
How to fill and revise a canvas made from the Design (canvas) appifact type.
精选 asgeirtj/system_prompts_leaks 6.9 万 原文
Claude CodeCodex CLICursor
pages
The shared Claude Docs viewer — an artifact TYPE. An artifact made from it is a doc: a live document that people and Claude read and edit together (people may also call it a page). The doc's content does not live in this artifact's files at all — it lives in the Claude Docs service and is read and written ONLY through the Claude Docs connector (its create, batch, read and update tools). Read this before touching such an artifact: it says what the files are, that an instance owns none of its own, how to change what the doc says (the connector, never a publish), and where a comment on the doc — including one sent to you from it — is read and answered (the connector's comment verbs; never these files, never the artifact's comment relay).
精选 asgeirtj/system_prompts_leaks 6.9 万 原文
Claude CodeCodex CLICursor
slides
How to fill and revise a deck made from the Slides appifact type.
精选 asgeirtj/system_prompts_leaks 6.9 万 原文
Claude CodeCodex CLICursor
deep-research
Use this skill when the user's prompt requires (1) researching a topic across multiple sources, comparing options or alternatives, analyzing trends or history, understanding markets or industries, or reviewing literature or studies and (2) synthesizing that research into a comprehensive, narrative report. If you're planning to search the web or internal knowledge bases, consider using this skill. This skill coordinates research subagents, so use it only when you have a tool for spawning subagents (the Agent or Task tool); otherwise, research the question directly.
精选 asgeirtj/system_prompts_leaks 6.9 万 原文
Claude CodeCodex CLICursor

相似 Skill

更多「编码」
access
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed, or change policy for the Discord channel.
精选 anthropics/claude-plugins-official 3.8 万 原文
Claude CodeMCP 客户端
configure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how do I set this up" or "who can reach me," or wants to check channel status.
精选 anthropics/claude-plugins-official 3.8 万 原文
Claude CodeMCP 客户端
access
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed, or change policy for the iMessage channel.
精选 anthropics/claude-plugins-official 3.8 万 原文
Claude CodeMCP 客户端
configure
Check iMessage channel setup and review access policy. Use when the user asks to configure iMessage, asks "how do I set this up" or "who can reach me," or wants to know why texts aren't reaching the assistant.
精选 anthropics/claude-plugins-official 3.8 万 原文
Claude CodeMCP 客户端
access
Manage Telegram channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed, or change policy for the Telegram channel.
精选 anthropics/claude-plugins-official 3.8 万 原文
Claude CodeMCP 客户端
configure
Set up the Telegram channel — save the bot token and review access policy. Use when the user pastes a Telegram bot token, asks to configure Telegram, asks "how do I set this up" or "who can reach me," or wants to check channel status.
精选 anthropics/claude-plugins-official 3.8 万 原文
Claude CodeMCP 客户端