Skip to content

Fix Command shortcuts in iPhone Mirroring - #1206

Open
Sc0re-16 wants to merge 1 commit into
rime:masterfrom
Sc0re-16:fix/iphone-mirroring-command
Open

Sc0re-16 wants to merge 1 commit into
rime:masterfrom
Sc0re-16:fix/iphone-mirroring-command

Conversation

@Sc0re-16

Copy link
Copy Markdown

Reproduction

  1. Select Squirrel as the macOS input source and focus a text field in iPhone Mirroring.
  2. Press ⌘V or ⌘A with the physical keyboard. The shortcut may enter a letter instead of pasting or selecting text.
  3. Select macOS ABC and repeat in the same field. The shortcuts work.

Change

On the affected Mac, Squirrel's input controller received two .flagsChanged callbacks with the same state for each Left Command press and release. It returned false for the first callback and true for the second. The shortcut's letter key was absent from the controller's key-down trace.

Return false for repeated Left or Right Command events when the client is com.apple.ScreenContinuity. All other clients and modifier events keep their existing handling.

Verification

  • On macOS 27.3, a diagnostic build based on Squirrel 1.1.2 reproduced the failure. With both Command callbacks passed through, ⌘V and ⌘A worked with the physical Left Command key.
  • With the logging removed and the rebuilt 1.1.2 installed under the normal Squirrel input source, the user retested paste and Chinese input successfully.
  • This PR applies the same change to current master. The resulting branch built locally with Xcode 27.2. The physical-device tests above were on the 1.1.2 build.

Fixes #1137

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.

[Bug]iPhone镜像无法使用command+z/a/c/v等快捷键

1 participant