Repository navigation
fix(typing): send left Shift for remote desktop typing (1.7.5) - #136
Conversation
Windows App ignored the generated Shift state because the events lacked the device-dependent left Shift flag, so shifted characters arrived unshifted (on a German layout `?` became `ß`). Shift key and character events now carry NX_DEVICELSHIFTKEYMASK, and the Shift event is created as a real keyboard event. Bump version to 1.7.5. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: be00f990-f67c-463f-8f13-05f686f1a363
There was a problem hiding this comment.
🟢 Approved
No active review issues are blocking approval of the remote desktop typing fix.
No open issues 🎉
What changed in this PR
Fixes shifted-character delivery in OpenWritr’s remote desktop typing mode, addressing cases such as ? arriving as ß in Windows App with a German keyboard layout.
Changes:
- Adds the device-dependent left-Shift flag to modifier and character events and constructs Shift events as keyboard events.
- Adds regression coverage for event order, key codes, and modifier flags when typing
?ßAa. - Prepares version 1.7.5 with updated bundle versions and release notes.
| File | Description |
|---|---|
Tests/OpenWritrTests/TextTypingTests.swift |
Tests shifted and unshifted remote keyboard event sequences. |
Sources/OpenWritr/TextTyping.swift |
Sends left-Shift flags and keyboard-backed modifier events. |
Info.plist |
Bumps both bundle version fields to 1.7.5. |
CHANGELOG.md |
Documents the remote desktop typing fix for 1.7.5. |
Review effort: Balanced
There was a problem hiding this comment.
No high-confidence actionable HIG defects were found.
The PR changes only the version in Info.plist and the synthetic Shift key events in Sources/OpenWritr/TextTyping.swift. It makes no visible UI, accessibility, colour, motion, or privacy changes.
Rendered surfaces and variants reviewed:
- Settings: light, dark, and light with larger accessibility text.
- About: light, dark, and dark with larger accessibility text.
- Overlay, in both light and dark: listening, transcribing, enhancing, done, copied, clipboard, enhanced-clipboard, and error.
I found no clipping, contrast, or state-display regressions in these images.
Generated by Apple HIG visual review for #136 · copilot · auto · 15.2 AIC · ⌖ 0.509 AIC · ⊞ 4K
Problem
With Type Text in Remote Desktop Apps on, shifted characters arrived unshifted in Windows App: on a German layout
?was typed asß. Manual typing in the same session was fine.Fix
The synthesized Shift
flagsChangedevent and the character key events carried only the device-independentmaskShift, not the device-dependent left-Shift bit (NX_DEVICELSHIFTKEYMASK) a real key press has. Both now carry it, and the Shift event is created as a real keyboard event with key code 0x38.Validation
swift build -c release -Xswiftc -warnings-as-errors,swiftlint lint --strict,swift test(120 tests) pass.RemoteKeyboardEventTestschecks event order and flags for?ßAa; it fails when the left-Shift bit is removed.?and capitals arrive correctly.Release prep: version bumped to 1.7.5, CHANGELOG section added.
Generated with an agent (GitHub Copilot CLI).