Repository navigation
Fix copied character announcements on macOS - #1150
Merged
trypsynth merged 2 commits intoOct 21, 2026
Merged
Conversation
Route Command+C in the focused document reader through the shared copy handler before Cocoa activates the Copy menu item. VoiceOver can then announce the number of copied characters instead of only the menu label. Enable the shared selection and whole-document copy path on macOS, remove the old Mac-only widening helper, and preserve native copying in other controls. Add native keyboard regression coverage for copying, selection preservation, keyboard-source cleanup, and editable-field copying.
…unners never give
trypsynth
approved these changes
Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Copying selected document text with Command+C on macOS only made VoiceOver say “Copy”, because Cocoa handled the shortcut and bypassed Paperback’s character-count announcement. Route the reader’s copy command through the shared copy handler before Cocoa activates the menu item, so VoiceOver announces messages such as “626 characters copied.”
Native copying in editable fields and whole-document copying after Select All are preserved. The Mac keyboard regression test covers command dispatch, clipboard contents, selection preservation, and copying from an editable field.
Validation on macOS:
cargo run -p paperback --release: open a document, select text, and copy with Command+C; confirmed VoiceOver announces the copied character count.cargo test --workspacecargo clippy --release --workspace --all-targets(passes with existing warnings)cargo +nightly fmt --all -- --checkWindows and Linux were not tested locally.