forked from Blendman974/faceclaw
Add tokens and faceclaw-input script, which allows using a CLI utility as an input device for the glasses
This commit is contained in:
1 parent
313ba85708
commit
ccb320c66f
32 files changed
+1785
-12
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { startRemoteInput } from "../remote/service";
|
||||
import { acceptInput, resetRingInputFilter } from "../ui/input-monitor";
|
||||
import { Application, ImageSource } from "@nativescript/core";
|
||||
import { EvenAIStatus, EvenAIStatusName, EventSourceType, EventSourceTypeName, OsEventTypeList, OsEventTypeName, WatchGestureType, WatchGestureTypeName } from "./events";
|
||||
@@ -404,6 +405,15 @@ class DashboardController {
|
||||
this.syncAssistantBridge();
|
||||
// The watch drives the same synthetic-input path as the phone UI's test
|
||||
// buttons, plus app/window/lock commands; it mirrors the state below.
|
||||
startRemoteInput({
|
||||
ready: () => this.phase === "connected" || this.phase === "charging",
|
||||
locked: () => this.glassesLocked,
|
||||
input: (gesture, source) => this.injectSyntheticRingInput(gesture, source),
|
||||
acceptsText: () => !!shell.foregroundWindow()?.receiveTextInput,
|
||||
text: (text, submit) => { if (!shell.isScreenOn()) shell.wake("window"); shell.sendTextToForegroundWindow(text, { submit }); this.requestShellRender(); },
|
||||
assistantAvailable: () => shell.isAssistantAvailable(),
|
||||
assistant: text => shell.sendToAssistant(text),
|
||||
});
|
||||
this.wearRemote = new WearRemote({
|
||||
apps: LAUNCHABLE_APPS,
|
||||
injectInput: (kind) => this.injectSyntheticRingInput(kind, "watch"),
|
||||
|
||||
Reference in new issue
Block a user