input-inject: record why the lock hotkey's desktop gate is N/A (QA finding 2)
Windows wraps the `HotKeyLockMachine` branch in `if (!Common.RunOnLogonDesktop && !Common.RunOnScrSaverDesktop)` (`InputSimulation.cs:408-409`); `KeyState.processDown` has no such guard, and nothing said whether that was considered or missed. Both flags are set only where the MWB service launches a second copy of the process onto the `Winlogon` or `Screen-saver` secure desktop (`Program.cs:150-167`, `Common.cs:176-186`). macOS has no secure-desktop session split, no copy of us behind `loginwindow` or the screen saver, and a user-space `CGEventTap` neither receives nor posts once the screen is locked; the Windows service is out of scope besides (README D6). So the condition is unconditionally true for a Mac receiver and the always-eat-and-lock behaviour is the faithful port. Recorded as docs/protocol.md 10.5 note 8 (appended, so the note numbers existing citations use stay stable), as a feature README Assumptions bullet, and as a comment at the site in `KeyState.processDown`. No behaviour change. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
1 parent
3ea50a7ae3
commit
9a1ad519de
3 files changed
+46
No files matched your search
@@ -86,6 +86,28 @@ work log.
|
||||
*this* Mac's setting, which is how the lock hotkey actually reaches a
|
||||
peer (§10.5 note 2). `InjectorConfig.lockMachine` carries it.
|
||||
Ctrl+Alt+End is not eaten by Windows, so the key still posts here.
|
||||
***(amended)*** The chord booleans and the lock-hotkey test are fed the
|
||||
**raw** VK off the wire, never `KeyState.normalise(vk:)`'s output:
|
||||
`InputProcessKeyEx`'s two switches are side-specific only
|
||||
(`InputSimulation.cs:372-403` up, `:418-438` down) and `HotkeyMatched`
|
||||
(`:406`) gets the raw `vkCode`, so a side-less `VK_SHIFT`/`VK_CONTROL`/
|
||||
`VK_MENU` — which the lock-chord replay sends — moves nothing
|
||||
(docs/protocol.md §10.5 note 3). `normalise(vk:)` is the posting path alone.
|
||||
- **Windows' desktop gate on the lock hotkey is considered and
|
||||
inapplicable, so the hotkey is always eaten and always locks.**
|
||||
`InputSimulation.cs:408-409` skips the `HotKeyLockMachine` branch when
|
||||
`Common.RunOnLogonDesktop` or `Common.RunOnScrSaverDesktop` is set.
|
||||
Those flags are set only where the MWB **service** launches a second
|
||||
copy of the process onto the `Winlogon` or `Screen-saver` secure
|
||||
desktop (`Program.cs:150-167`, `Common.cs:176-186`). macOS has no
|
||||
secure-desktop session split — one process per login session, no copy
|
||||
of us running behind `loginwindow` or the screen saver, and a
|
||||
user-space `CGEventTap` neither receives nor posts once the screen is
|
||||
locked — and the Windows service is out of scope anyway (README D6).
|
||||
`KeyState.processDown` therefore has no guard: a decision, not an
|
||||
omission. Recorded as docs/protocol.md §10.5 note 8. (The hardcoded Win+L
|
||||
branch `:450-460` is ungated on Windows too, so it was never in
|
||||
question.)
|
||||
- **`releaseAll()`** posts key-up for every key and button the injector
|
||||
believes is down — a superset of Windows' fixed modifier list
|
||||
(`InitAndCleanup.cs:214-243`) because a lost key-up for a letter is as
|
||||
|
||||
Reference in new issue
Block a user