Skip to content

Conversation

@ThomasK33
Copy link
Member

Summary

  • Add ? hotkey to open a modal showing all available keyboard shortcuts
  • Create a centralized shortcuts configuration as the single source of truth
  • Modal auto-generates from config — no manual sync needed between docs and handlers
  • All keyboard handlers now use matchesKey() utility for consistency

Changes

New files:

  • src/browser/lib/shortcuts.ts — Central config with types, definitions, and utilities
  • src/browser/components/keyboard-shortcuts-modal.tsx — Modal component

Modified files:

  • src/browser/components/app-shell.tsx — Add ? listener and render modal
  • src/browser/components/command-palette.tsx — Use matchesKey() for Cmd+K/P
  • src/browser/contexts/pr-review/useKeyboardNavigation.ts — Use matchesKey() for all PR review shortcuts

Test plan

  • Press ? anywhere in the app (not in an input) — modal should open
  • Verify all shortcuts are displayed and grouped correctly
  • Press Escape or click outside to close the modal
  • Verify existing shortcuts still work (j/k navigation, Cmd+K, etc.)

@vercel
Copy link

vercel bot commented Dec 5, 2025

@ThomasK33 must be a member of the Coder team on Vercel to deploy.
- Click here to add @ThomasK33 to the team.
- If you initiated this build, request access.

Learn more about collaboration on Vercel and other options here.

@ThomasK33 ThomasK33 force-pushed the feat/keyboard-shortcuts-modal branch 2 times, most recently from f7e6f65 to 4982509 Compare December 5, 2025 10:07
@ThomasK33 ThomasK33 requested a review from kylecarbs December 5, 2025 10:10
@kylecarbs
Copy link
Member

@ThomasK33 can you post screenshot pls

@kylecarbs kylecarbs marked this pull request as draft December 5, 2025 17:32
@kylecarbs kylecarbs marked this pull request as ready for review December 5, 2025 17:40
@kylecarbs kylecarbs marked this pull request as draft December 5, 2025 17:48
@kylecarbs kylecarbs marked this pull request as ready for review December 5, 2025 17:48
@kylecarbs kylecarbs marked this pull request as draft December 5, 2025 17:58
@kylecarbs kylecarbs marked this pull request as ready for review December 5, 2025 17:58
@kylecarbs kylecarbs marked this pull request as draft December 5, 2025 18:03
@kylecarbs kylecarbs marked this pull request as ready for review December 5, 2025 18:03
@kylecarbs kylecarbs marked this pull request as draft December 5, 2025 18:03
@kylecarbs kylecarbs marked this pull request as ready for review December 5, 2025 18:04
@kylecarbs kylecarbs marked this pull request as draft December 5, 2025 18:13
@kylecarbs kylecarbs marked this pull request as ready for review December 5, 2025 18:13
@kylecarbs kylecarbs marked this pull request as draft December 5, 2025 18:13
@ThomasK33
Copy link
Member Author

@ThomasK33 can you post screenshot pls

CleanShot 2025-12-05 at 19 18 30@2x

- Add `?` hotkey to open a modal showing all available shortcuts
- Create centralized shortcuts config in src/browser/lib/shortcuts.ts
- Modal auto-generates from config (no manual sync needed)
- Update all keyboard handlers to use matchesKey() utility
- Shortcuts organized by category: Navigation, Actions, Go to Line, File Search, Tabs, Help

Change-Id: I4c7d8b209ed70901f7b6e3c61c275a34207f7369
Signed-off-by: Thomas Kosiewski <tk@coder.com>
Change-Id: If0ba43b175821808ac897cd08e0a82f3af04c91e
Signed-off-by: Thomas Kosiewski <tk@coder.com>
@ThomasK33 ThomasK33 force-pushed the feat/keyboard-shortcuts-modal branch from 4982509 to 97ca37c Compare December 5, 2025 18:20
@kylecarbs kylecarbs marked this pull request as ready for review December 5, 2025 19:32
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