Skip to content

Send macOS editing commands for Chromium keyboard shortcuts - #87

Merged
kblok merged 1 commit into
mainfrom
fix/mac-editing-commands
Oct 22, 2026
Merged

kblok merged 1 commit into
mainfrom
fix/mac-editing-commands

Conversation

@kblok

@kblok kblok commented Oct 6, 2026

Copy link
Copy Markdown
Member

On macOS, Chromium keyboard shortcuts like Meta+A, copy, cut, paste, undo and redo did nothing. Chromium does not run the native key bindings for synthetic key events, so six PageKeyboardTests failed on a Mac. Upstream solves this by sending the matching macOS editing commands in the commands field of Input.dispatchKeyEvent, and we now do the same.

The commands go out only when the browser user agent says Macintosh, exactly like upstream, so Linux and Windows are unchanged. The command table already existed for WebKit; it now lives in Input/ so both keyboards share it and the shortcut builder.

🤖 Generated with Claude Code

Chromium does not run native key bindings for synthetic key events on
macOS, so Meta+A, copy/paste, undo/redo and similar shortcuts did
nothing. Upstream crInput sends the matching macEditingCommands in
Input.dispatchKeyEvent when the browser runs on a Mac. Do the same, and
share the existing WebKit command table and shortcut builder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kblok
kblok merged commit 0556d55 into main Oct 22, 2026
37 of 39 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.

1 participant