Add touch-down event to simulated and watch inputs

This commit is contained in:
James Babcock committed 2026-09-28 02:34:08 -07:00
1 parent 45d2ece0d2
commit 2052e268b0
19 files changed
+191 -35

No files matched your search

+12
View File
@@ -43,6 +43,8 @@ import { FACECLAW_VERSION } from "../version";
export const WEAR_PROTOCOL_VERSION = 1;
export type WearRemoteInputKind =
/** Touch-down at the start of any pad gesture; arrives on its own path (see handleMessage). */
| "ring-press"
| "click"
| "double-click"
| "scroll-up"
@@ -309,6 +311,16 @@ export class WearRemote {
this.setWatchBattery(valid ? battery : null, valid ? message.payload.charging === true : null);
return;
}
if (message.path === WEAR_PATHS.press) {
// Touch-down ahead of the gesture that follows it. Fire-and-forget like
// the battery (no seq, never acked): wherever that gesture would be
// refused, the press is dropped silently and the gesture's ack says why.
const phase = this.host.getState().phase;
if (watchRemoteEnabledSetting.get() && (phase === "connected" || phase === "charging")) {
await this.host.injectInput("ring-press");
}
return;
}
if (!watchRemoteEnabledSetting.get()) {
ack(false, "Watch control is turned off in Faceclaw's Settings > Watch.");
return;