fix(computer): preserve modifier keys through VNC - #3097
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6c230b3aa4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| shift: 'shift', | ||
| alt: 'option', | ||
| option: 'option', | ||
| meta: 'command', |
There was a problem hiding this comment.
Preserve the normalized Windows modifier
When physical mode targets a Windows VNC session and KeyboardPress receives a shortcut such as Windows+R, normalizeKeyName() converts the modifier to win, but this map has no win entry; resolveModifierKeys() then silently filters it out and sends only r. Map win to the physical Command/Meta key, or reject it explicitly, so the shortcut is not silently altered.
AGENTS.md reference: AGENTS.md:L8-L8
Useful? React with 👍 / 👎.
Summary
keyboardEventMode: physicalmode for macOS AppleScript control of VNC clientslogicalas the defaultValidation
pnpm run lintpnpm run type-check:testspnpm exec nx test @midscene/computer --skip-nx-cache(125 passed, 1 skipped)pnpm exec nx build @midscene/computer --skip-nx-cache/usr/bin/osacompileReview
A serial standard and thermo-nuclear review was run against a frozen diff. The findings were resolved by extracting the AppleScript backend, documenting the physical-mode constraints, and strengthening boundary and modifier tests. The reconciled verdict is acceptable.
Remaining validation boundary
The explicit modifier sequence is covered by generated-script and integration tests, but this environment does not provide a real VNC server for an end-to-end remote keyboard test.