input-inject: wheel remainder, release buttons at the real pointer

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
lucioandClaude Opus 5 committed 2026-09-16 02:52:40 -07:00
1 parent f6fc2c5bd3
commit ccb058ed3a
2 files changed
+37 -12

No files matched your search

+8 -2
View File
@@ -67,7 +67,10 @@ work log.
`mouseEventClickState` 2, 3…, reset otherwise.
- **Wheel**: `WM_MOUSEWHEEL` → `CGEvent(scrollWheelEvent2Source:units:
.line, wheelCount: 1, wheel1: WheelDelta / 120)`; `WM_MOUSEHWHEEL` →
`wheelCount: 2, wheel2:`. Sign: Windows +120 is away from the user,
`wheelCount: 2, wheel2:`. ***(amended)*** The division keeps a
remainder per axis: a high-resolution wheel sends fractions of a notch
and integer division alone would drop a slow scroll entirely. Sign:
Windows +120 is away from the user,
which is CG line +1. The user's "natural scrolling" preference is
applied by the system to posted events too; whether that matches what
they expect from a remote mouse is a CP1 question, recorded in §10.5.
@@ -313,7 +316,10 @@ the reasoning here).
the function keys — real macOS events carry them and some text views
read them. Windows has no equivalent; this is the mirror image of
input-capture synthesising `LLKHF_EXTENDED` (§10.4 note 6).
9. **Two CP1 questions recorded, not decided**: remote ⌘L locks this Mac
9. **Wheel deltas keep a per-axis remainder**, mirroring what
`EventTap` does in the other direction, so a high-resolution wheel's
sub-notch deltas are accumulated rather than truncated to nothing.
10. **Two CP1 questions recorded, not decided**: remote ⌘L locks this Mac
(faithful to Win+L with D4's Win=⌘, but ⌘L is a common Mac shortcut),
and whether "natural scrolling" should apply to a remote wheel.