Simulated Ring input is touchpad-style

This commit is contained in:
James Babcock committed 2026-08-30 19:50:37 -07:00
1 parent 602f66f15b
commit 01527adda9
3 files changed
+32 -22

No files matched your search

+15 -7
View File
@@ -12,7 +12,6 @@ import {
type View,
} from "@nativescript/core";
import { dashboardController, type MirrorTouchKind } from "../g2/dashboard-controller";
import { shell } from "../ui/shell/shell";
import {
brightnessSetting,
DISPLAY_MODE_VALUES,
@@ -815,18 +814,27 @@ export class MainViewModel extends Observable {
await dashboardController.injectSyntheticRingInput("scroll-down");
}
async onSyntheticLeftTap(): Promise<void> {
await dashboardController.injectSyntheticRingInput("double-click");
}
async onSyntheticRightTap(): Promise<void> {
async onRingPadTap(): Promise<void> {
await dashboardController.injectSyntheticRingInput("click");
}
async onSyntheticLongPressTap(): Promise<void> {
async onRingPadDoubleTap(): Promise<void> {
await dashboardController.injectSyntheticRingInput("double-click");
}
async onRingPadLongPress(): Promise<void> {
await dashboardController.injectSyntheticRingInput("long-press");
}
/** The ring pad only has a vertical axis, so left/right swipes are ignored. */
async onRingPadSwipe(args: SwipeGestureEventData): Promise<void> {
if (args.direction === SwipeDirection.up) {
await dashboardController.injectSyntheticRingInput("scroll-up");
} else if (args.direction === SwipeDirection.down) {
await dashboardController.injectSyntheticRingInput("scroll-down");
}
}
async onSyntheticMicTap(): Promise<void> {
await dashboardController.injectSyntheticRingInput("wakeword");
}