input-inject: protocol.md 10.5, feature README (assumptions, handshakes, work log), TODO ticks

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
lucioandClaude Opus 5 committed 2026-09-16 02:51:47 -07:00
1 parent d48f644450
commit f6fc2c5bd3
3 files changed
+321 -33

No files matched your search

+8 -5
View File
@@ -101,17 +101,20 @@ concurrency, shared constants, checkpoints) is fixed in `docs/contracts.md`.
controlling remote, restore; `HideMouse (50)`; clamp while
controlled §5.3.
## 5. input-inject (mac) — `Sources/MWBMac/Injector.swift`, `KeyState.swift`
## 5. input-inject (mac) — `Sources/MWBMac/Injector.swift`, `KeyState.swift` — done 2026-09-16
- [ ] `Keyboard` packet → `CGEvent` down/up via KeyMap; modifiers as
- [x] `Keyboard` packet → `CGEvent` down/up via KeyMap; modifiers as
`flagsChanged`; repeats as repeated downs; 10 ms after key-up like
Windows only if needed.
- [ ] `Mouse` packet → absolute move (de-normalise onto desktop bounds
Windows only if needed. *(Not needed: the Windows sleep compares
`LLKHF` bits against `WM_KEYUP` and never fires — §10.5 note 1.)*
- [x] `Mouse` packet → absolute move (de-normalise onto desktop bounds
§4.4), buttons with click-count, wheel (`WheelDelta`/120), X-buttons.
- [ ] Reads the injected-event tag from `InputTypes.swift` (C4); tracks
- [x] Reads the injected-event tag from `InputTypes.swift` (C4); tracks
held keys/buttons; `releaseAll()` = `ReleaseAllKeys` for every
recovery row in C2 plus switch/lock/mode change; remote Win+L ⇒
lock (`CGSession -suspend`); remote Ctrl+Alt+Del ⇒ ignored, logged.
*(`releaseAll()` and `lockThisMac()` are published; calling them on
each recovery row is app-shell's wiring — see the lane's Handshakes.)*
## 6. app-shell (app + core + mac) — `Sources/mwb/*`, `Sources/MWBCore/Settings.swift`, `Sources/MWBMac/StatusItem.swift`, `Sources/MWBMac/SettingsWindow/*.swift`, `Sources/MWBMac/Notifications.swift`