Skip to content

Add Windows Touch Mode, per-digitizer calibration, and HID event logging - #23

Open
Jac0b-Shi wants to merge 1 commit into
shueber:mainfrom
Jac0b-Shi:feat/calibration-and-windows-touch-mode
Open

Add Windows Touch Mode, per-digitizer calibration, and HID event logging#23
Jac0b-Shi wants to merge 1 commit into
shueber:mainfrom
Jac0b-Shi:feat/calibration-and-windows-touch-mode

Conversation

@Jac0b-Shi

Copy link
Copy Markdown

Windows Touch Mode

  • New "Windows Touch Mode" toggle in Settings → Gestures
  • Tap-to-click: first tap moves cursor, second tap at same position clicks
  • Double-tap produces double-click (via existing cursorClickCount infrastructure)
  • Long press triggers secondary click (right-click)
  • One-finger drag performs mouse drag instead of scrolling
  • Two-finger drag scrolls instead of dragging
  • Uses hypot() for correct Euclidean double-click distance check (fixes a bug where the original && required both axes to exceed tolerance)

Per-Digitizer Calibration

  • New TouchCalibration struct: 6-parameter affine transform (a,b,c,d,e,f)
  • Least-squares fitting via 3x3 Gaussian elimination (min 3 sample points)
  • 9-point calibration UI in Debug Overlay with real-time error feedback
  • Calibration is persisted per-digitizer in UserDefaults
  • TUCTouchDelegate gains optional -calibratedRelativePoint:forLocationID:

HID Event Logging (optional)

  • SetHIDEventLogging() in HIDInterpreter for troubleshooting
  • Structured os_log_info output for touch reports
  • logCursorEvents property on TUCCursorUtilities

Other

  • Rich device identity in Digitizer model (name, vendorID, productID, serialNumber)
  • Refactored HID non-hybrid touch dispatch into DispatchNonHybridTouches()

## Windows Touch Mode
- New "Windows Touch Mode" toggle in Settings → Gestures
- Tap-to-click: first tap moves cursor, second tap at same position clicks
- Double-tap produces double-click (via existing cursorClickCount infrastructure)
- Long press triggers secondary click (right-click)
- One-finger drag performs mouse drag instead of scrolling
- Two-finger drag scrolls instead of dragging
- Uses `hypot()` for correct Euclidean double-click distance check
  (fixes a bug where the original `&&` required both axes to exceed tolerance)

## Per-Digitizer Calibration
- New `TouchCalibration` struct: 6-parameter affine transform (a,b,c,d,e,f)
- Least-squares fitting via 3x3 Gaussian elimination (min 3 sample points)
- 9-point calibration UI in Debug Overlay with real-time error feedback
- Calibration is persisted per-digitizer in `UserDefaults`
- `TUCTouchDelegate` gains optional `-calibratedRelativePoint:forLocationID:`

## HID Event Logging
- `SetHIDEventLogging()` in HIDInterpreter for troubleshooting
- Structured `os_log_info` output for touch reports
- `logCursorEvents` property on TUCCursorUtilities

## Other
- Rich device identity in `Digitizer` model (name, vendorID, productID, serialNumber)
- Refactored HID non-hybrid touch dispatch into `DispatchNonHybridTouches()`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant