Skip to content

feat: rebindable keybindings, format menu and native macOS menus - #22

Merged
ljm12914 merged 1 commit into
mainfrom
refactor/keybindings
Dec 2, 2026
Merged

ljm12914 merged 1 commit into
mainfrom
refactor/keybindings

Conversation

@ljm12914

@ljm12914 ljm12914 commented Dec 2, 2026

Copy link
Copy Markdown
Member

Summary

  • One command table drives the title-bar menus, the macOS native menu bar, the command palette, shortcut labels and a new VS Code-style keyboard shortcuts page (search, key recording, conflict replace/cancel, reset).
  • Shortcuts use a primary modifier (Ctrl on Windows/Linux, Cmd on macOS), resolve physical keys through the keyboard layout, and support multi-step sequences without a timeout. No reserved keys; Mod+J is left free in the defaults for future AI commands.
  • User overrides are stored per platform in app settings (keybindings.win/mac/linux), only for changed commands; invalid entries are repaired on read without invalidating the settings file.
  • New commands: format menu (marks, link, convert-to submenu), find in page, back/forward, reopen closed tab, tab context menu, close others/right/all, fullscreen, quit. Editor mark keymaps now go through the command table.

Verification

  • typecheck, lint (0 warnings), knip, db:check: pass
  • test:db 332 passed (incl. new tests/keybindings.test.ts), test:feed 45 passed
  • perf: absolute thresholds met; find on a 10k-block page ~16 ms, next match ~5 ms

Not verified

  • macOS behaviour (native menu, Cmd keys, traffic-light spacing) needs a real Mac.
  • AltGr layouts: typing detection relies on getModifierState("AltGraph") only.

🤖 Generated with Claude Code

- One command table drives the title-bar menus, the macOS native menu bar,
  the command palette, shortcut labels and the new keyboard shortcuts page.
- Shortcuts are written with a primary modifier (Ctrl on Windows and Linux,
  Cmd on macOS), resolved from physical keys through the keyboard layout,
  and may be multi-step sequences without a timeout.
- User overrides are stored per platform in app settings; prefix and exact
  conflicts are resolved at recording, and user bindings beat defaults.
- Add the format menu with links and block conversion, find in page,
  back/forward, reopen closed tab, the tab context menu, fullscreen and quit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ljm12914
ljm12914 merged commit 23aba4b into main Dec 2, 2026
1 check 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.

1 participant