本文へ移動
cccskills
無料GitHub で公開

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

インストール方法を見る

含まれるファイル(1)

  • SKILL.md14.9 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

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

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

3d-object

無料

three.js model, downloadable as OBJ or GLB

日本語の概要は準備中です。原文の説明を表示しています。

asgeirtj/system_prompts_leaks7万2026年10月12日 更新

Manage your private to-do list for the user. Use to add or update tasks, record what they are waiting on, track blockers, mark tasks complete or canceled, and clean up the list. Not for Dreamers or external task trackers.

日本語の概要は準備中です。原文の説明を表示しています。

asgeirtj/system_prompts_leaks7万2026年10月12日 更新

agents

無料

Run a goal as a project: you coordinate. Use for "agents <task>", "take this to done", "work on this in parallel", "what are my threads doing", "pick up <slug>", "resume <slug>", "keep going until it is merged". Under `/agents` you do the work yourself unless it needs several lanes or a long wait — you judge; the plan line says why. No target you could verify (a file, API, number or measure) → the grill interview first, not threads. Read this skill before proposing anything for `/agents`: without it a proposal is in-session subagents.

日本語の概要は準備中です。原文の説明を表示しています。

asgeirtj/system_prompts_leaks7万2026年10月12日 更新

Timeline-based motion design

日本語の概要は準備中です。原文の説明を表示しています。

asgeirtj/system_prompts_leaks7万2026年10月12日 更新

The user's synced Apple Health (HealthKit) data: daily metrics (steps, distance, calories, heart rate, HRV, VO2max), sleep sessions (stages, quality, efficiency), and workouts.

日本語の概要は準備中です。原文の説明を表示しています。

asgeirtj/system_prompts_leaks7万2026年10月12日 更新

Create, read, edit, or manipulate Word documents (.docx) and Word templates (.dotx). Use whenever a build task's artifact kind is document with the default docx output, or the task mentions a Word doc, .docx, or .dotx, extracts or reorganizes content from one, inserts or replaces images, does find-and-replace in one, or works with tracked changes (redlines) or comments. Covers python-docx generation, raw OOXML editing of existing files, document structure and formatting, and render verification. Not for PDFs, spreadsheets, or Google Docs.

日本語の概要は準備中です。原文の説明を表示しています。

asgeirtj/system_prompts_leaks7万2026年10月12日 更新

asgeirtj のスキルをすべて見る

このスキルの問題を報告する