Skip to content

feat: keyboard mapping#2

Merged
fhsgoncalves merged 6 commits into
fhsgoncalves:mainfrom
VictorlBueno:feat/keyboard-map
Jun 9, 2026
Merged

feat: keyboard mapping#2
fhsgoncalves merged 6 commits into
fhsgoncalves:mainfrom
VictorlBueno:feat/keyboard-map

Conversation

@VictorlBueno

@VictorlBueno VictorlBueno commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Keyboard Shortcuts & Keymap Panel

This PR adds a keyboard shortcut system with a visual keymap panel, allowing users to view and remap all available shortcuts.

image

Keymap Panel (cmd-,)

  • New modal panel listing all keyboard shortcuts grouped by category (Editor, Navigation, Panels, etc.)
  • Live search to filter shortcuts by label or key binding
  • Click any row to record a new key binding for that action
  • Scrollable list with visible scrollbar
  • Remappings are persisted and applied immediately via CustomKeymap

New Panel Shortcuts

Shortcut Action
cmd-b Toggle left panel
cmd-shift-b Toggle right panel
cmd-shift-t Toggle terminal
cmd-shift-r Toggle query results
cmd-, Toggle keyboard shortcuts

Smart Toggle Behavior (all panel shortcuts)

All shortcuts follow the same three-state logic:

  • Panel closed → opens and immediately focuses it (keyboard navigation works right away)
  • Panel open, not focused → focuses the panel without closing it
  • Panel open and focused → closes it and returns focus to the editor

Tooltip Improvements

Dock buttons (terminal, results, left/right panel toggles) now show the bound keyboard shortcut in their tooltip via tooltip_with_action.

Bug Fixes

  • Fixed cx.clear_key_bindings() wiping gpui-component Input bindings (backspace, cmd-a/c/v/x, undo, etc.) — re-registers them after each keymap reload
  • Fixed keymap modal button remaining disabled after closing — resolved by synchronously focusing the workspace root on close before deferring editor focus
  • Fixed shortcuts becoming unresponsive after closing a panel — all close paths now restore focus to the workspace root immediately, so shortcuts fire again without requiring a manual click

@VictorlBueno VictorlBueno changed the title feat: keyboard mapping modal feat: keyboard mapping Jun 8, 2026
@fhsgoncalves

Copy link
Copy Markdown
Owner

Nice! 🌟

@fhsgoncalves fhsgoncalves merged commit d146702 into fhsgoncalves:main Jun 9, 2026
5 checks passed
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.

2 participants