AgentSkillsCN

Keybindings Help

当用户希望自定义键盘快捷键、重新绑定按键、添加复合键绑定,或修改 ~/.claude/keybindings.json 时,可使用此技能。例如:“重新绑定 Ctrl+S”“添加复合快捷键”“更改提交键”“自定义快捷键设置”。

SKILL.md
--- frontmatter
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".

Keybindings Help Skill

Help users customize Claude Code keyboard shortcuts while avoiding conflicts with their environment.

User Environment

This user runs Claude Code inside NeoVim terminal. Keybindings must be cross-referenced against:

  • NeoVim keymaps: ~/.config/nvim/lua/keymaps.lua
  • Plugin keymaps: ~/.config/nvim/lua/custom/plugins/

Key Files

Known NeoVim Conflicts to Avoid

These keys are used by the user's NeoVim setup and should NOT be used in Claude Code:

KeyNeoVim Usage
Ctrl+SSave file (:w)
Ctrl+EOil toggle float
Ctrl+TOil open in tab
Ctrl+H/J/K/LWindow navigation
Ctrl+POil preview
Ctrl+RShell history search
Ctrl+OYazi open/pick window
Ctrl+VYazi vertical split
Ctrl+GNeoVim print file info
Ctrl+QQuit buffer

Safe Modifier Combinations

Use these to avoid conflicts:

  • Ctrl+Shift+<key> - Generally safe
  • Meta+<key> (Alt/Option) - Safe except M-j/k/l/u/i/o (Harpoon)
  • Ctrl+/ - Safe alternative for search

Current Modified Bindings

ActionNew BindingOriginal
Toggle TodosCtrl+Shift+TCtrl+T
Toggle TranscriptCtrl+Shift+XCtrl+O
History SearchCtrl+/Ctrl+R
Chat StashCtrl+Shift+SCtrl+S
External EditorCtrl+Shift+GCtrl+G
Toggle ExplanationCtrl+Shift+ECtrl+E

Workflow for Keybinding Changes

  1. Always read current ~/.claude/keybindings.json first
  2. Create backup before modifications: cp keybindings.json keybindings.json.backup
  3. Cross-reference against NeoVim config for conflicts
  4. Apply changes to the keybindings.json file
  5. Inform user to restart Claude Code for changes to take effect

Rollback

bash
cp ~/.claude/keybindings.json.backup ~/.claude/keybindings.json