Handle long presses: push-to-talk, with a tap-like fallback

On a real G2 a touch held slightly too long is reported as a long press
(sysEvent type 9, then type 10 on release; source 1 right temple, 3 left),
not as a tap, and was ignored. A long press now does what a tap does. If it
started a recording and is held at least 700 ms, releasing it sends
(push-to-talk); released sooner, it behaves like a tap and the recording
continues until the next tap or press.

Tests: 219 unit/integration; simulator 7 scenarios (long_press /
long_press_release through the automation API). Not reviewed, not deployed.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Dan
2026-11-21 13:11:55 -08:00
co-authored by Claude Fable 5.2
parent b8191a7bd2
commit 9cb34b3125
8 changed files with 148 additions and 7 deletions
+2
View File
@@ -70,6 +70,8 @@ export class FakeDevice implements DevicePort {
}
tap = () => this.emit({ type: 'tap' });
doubleTap = () => this.emit({ type: 'double_tap' });
longPress = () => this.emit({ type: 'long_press' });
longPressRelease = () => this.emit({ type: 'long_press_release' });
swipeDown = () => this.emit({ type: 'swipe_down' });
swipeUp = () => this.emit({ type: 'swipe_up' });
menu = (itemId: number) => this.emit({ type: 'menu', itemId });