Skip to content

feat(app): add document replace shortcut#213

Merged
murongg merged 1 commit into
mainfrom
feature/document-replace-shortcut
Jun 5, 2026
Merged

feat(app): add document replace shortcut#213
murongg merged 1 commit into
mainfrom
feature/document-replace-shortcut

Conversation

@murongg

@murongg murongg commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add platform-native document replace shortcuts: Ctrl+H on Windows/Linux and Cmd+Option+F on macOS.
  • Support macOS Cmd+Option+F even when Option changes the reported key value.
  • Leave macOS Ctrl+H Backspace/delete behavior alone.
  • Add a hover title to the case-sensitive Aa button in the document search bar.
  • Reserve Mod+H from configurable shortcuts so custom app shortcuts do not collide with native H shortcuts.
  • Cover the shortcut, macOS key event compatibility, tooltip, and reserved-shortcut behavior with tests.

Validation

  • pnpm --filter @markra/shared exec vitest run src/keyboard-shortcuts.test.ts --environment jsdom --globals
  • pnpm --filter @markra/app exec vitest run src/hooks/useNativeBindings.test.tsx
  • pnpm --filter @markra/app exec vitest run src/App.test.tsx
  • pnpm --filter @markra/shared build
  • pnpm --filter @markra/app build

Notes

  • Default Markra shortcuts do not conflict: document history remains Mod+Shift+H.
  • On macOS, use Cmd+Option+F for document replace; Ctrl+H remains the text-system Backspace/delete behavior.
  • Global search is left unchanged because it currently has search-only behavior; a global replace shortcut would need a separate workspace replace design.

Closes #208

@vercel

vercel Bot commented Jun 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
markra-web Ready Ready Preview, Comment Jun 5, 2026 11:07am

@murongg
murongg force-pushed the feature/document-replace-shortcut branch from b44731d to e315544 Compare June 5, 2026 11:07
@murongg
murongg marked this pull request as ready for review June 5, 2026 11:29
@murongg
murongg merged commit 2646ca9 into main Jun 5, 2026
4 checks passed
@murongg
murongg deleted the feature/document-replace-shortcut branch June 5, 2026 11:31
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.

[Feature]: 增添替换快捷键

1 participant