Skip to content

Fix adaptive keyboard input lag - #29

Merged
tnt07-t merged 1 commit into
mainfrom
tran/fix-latency-2
Jul 15, 2026
Merged

tnt07-t merged 1 commit into
mainfrom
tran/fix-latency-2

Conversation

@tnt07-t

@tnt07-t tnt07-t commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Fixed dropped touches during fast two-thumb typing: overlay had isMultipleTouchEnabled = false plus a didDispatch flag that silently ate overlapping touch-downs
  • Fixed full-keyboard re-render on every tap: pressedKey/pressedRect state was invalidating all ~30 shadowed keycaps per press/release
  • Static keycaps split into an Equatable KeyboardVisualLayer; pressed state now drawn as a small highlight overlay instead
  • Release now tracked via event.allTouches (any finger still down) instead of a single dispatch flag
  • Haptic now fires after touch dispatch and re-prepare()s, so it never delays key delivery

Testing

  • Built on device and confirm no missed keys during fast alternating-thumb typing in adaptive mode
  • Confirmed classic mode unaffected

…n tap

Adaptive-mode-only lag/missed keys traced to two bugs in the touch overlay:
isMultipleTouchEnabled=false plus a didDispatch flag silently dropped
overlapping touches during fast two-thumb typing, and per-tap pressedKey
state invalidated all ~30 shadowed keycaps on every press/release. Enables
multi-touch with per-touch dispatch, tracks release via allTouches instead
of a single flag, and splits static keycaps into an Equatable child view so
a keystroke only re-renders a small highlight overlay.
@tnt07-t
tnt07-t merged commit 53c42e9 into main Jul 15, 2026
1 check passed
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