Skip to content

feat: add custom keybindings support with VSCode-style configuration#3142

Draft
mswiszcz wants to merge 7 commits intowavetermdev:mainfrom
mswiszcz:feat/custom-keybindings
Draft

feat: add custom keybindings support with VSCode-style configuration#3142
mswiszcz wants to merge 7 commits intowavetermdev:mainfrom
mswiszcz:feat/custom-keybindings

Conversation

@mswiszcz
Copy link
Copy Markdown

@mswiszcz mswiszcz commented Mar 27, 2026

Edit: Discussed, this is going to be first iteration of keybindings support. Following VS Code guidelines. We will add chords and streamline keybindings to follow vs code format in next PRs.

This remains a draft until I manually verify if it's working properly and have a deep dive through the code.

Refactor keybindings into a declarative action registry with user override support via keybindings.json. Includes JSON schema, config sidebar entry, documentation, and Go backend support for reading keybindings config.

Refactor keybindings into a declarative action registry with user override
support via keybindings.json. Includes JSON schema, config sidebar entry,
documentation, and Go backend support for reading keybindings config.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 27, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: eb81cb42-615e-4f67-8199-7f5f0655fe43

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

mswiszcz and others added 6 commits March 28, 2026 00:36
…-style last-wins resolution

globalKeyMap and globalChordMap were Maps but checkKeyMap already iterated
linearly over all entries (no O(1) lookup benefit). Switching to arrays
with reverse iteration gives natural "last entry wins" semantics — user
overrides appended after defaults automatically shadow them without
explicit merge logic.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add block:focusnext (Ctrl+Shift+]) and block:focusprev (Ctrl+Shift+[)
  to cycle focus through blocks in leaf order
- Lowercase all keybinding command IDs to match settings.json conventions
  (e.g. block:splitRight → block:splitright, app:toggleAIPanel → app:toggleaipanel)
- Update schema and docs to reflect both changes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Both unbinding mechanisms now work:
- "-block:close" prefix removes all default keys for that command
- { key: null, command: "block:close" } does the same thing
Both append null-handler entries that shadow defaults via reverse iteration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add app:settings keybinding (Cmd+,) to open settings block
- Fix config editor rejecting keybindings.json save because it
  requires JSON objects — keybindings.json is an array by design.
  Added allowArray flag to ConfigFile type.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Users can now write "cmd:[" instead of "Cmd:[" in keybindings.json.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant