Watch
1
0
Fork
You've already forked souveraine
0

hands: arm the wire before opening the pad

This commit is contained in:
Fimeg 2026-08-17 11:08:36 -04:00
commit 59b52a818b
7 changed files with 210 additions and 148 deletions

View file

@ -88,6 +88,12 @@ Scope { // Scope
|| GlobalStates.missionPeek)
return Dock.DockState.Hidden;
// USB Hands owns the bottom of home while its trackpad is actually
// open. Arming the wire alone changes no furniture; opening the
// conditional controller makes the dock yield until it closes.
if (HidController.active)
return Dock.DockState.Hidden;
// A visible keyboard owns the bottom edge. This must precede the home
// zone's unconditional PINNED return below; otherwise home stacks the
// dock's exclusive zone under the OSK and charges the display twice.

View file

@ -290,12 +290,16 @@ Scope {
SheetLocal.PowerOptionRow {
Layout.fillWidth: true
icon: "keyboard"
title: "USB HID Injection"
detail: UsbState.mode === "hid"
? "Keyboard and pointer link armed"
: "Let this screen become the other machine's hands"
badge: UsbState.mode === "hid" ? "active"
: UsbState.hasMode("hid_mode") ? "wired" : "building"
title: "USB hand"
detail: HidController.active
? "Wire armed · trackpad open"
: HidController.modeReady
? "Keyboard and pointer wire armed"
: "Arm the wire, then open its trackpad"
badge: UsbState.busy ? "switching"
: HidController.active ? "open"
: HidController.modeReady ? "armed"
: UsbState.hasMode("hid_mode") ? "ready" : "building"
inset: 10
expandable: true
expanded: scope.hidOptionsOpen
@ -316,35 +320,41 @@ Scope {
SheetLocal.PowerOptionRow {
Layout.fillWidth: true
icon: "cable"
title: "USB control link"
detail: UsbState.mode === "hid"
? "Armed · tap to restore developer USB"
title: HidController.modeReady
? "Disarm USB hand" : "Arm USB hand"
detail: HidController.modeReady
? "Restore developer USB and close its controls"
: "Expose keyboard, pointer and developer network"
badge: UsbState.busy ? "switching"
: UsbState.mode === "hid" ? "active"
: HidController.modeReady ? "armed"
: UsbState.hasMode("hid_mode") ? "ready" : "not installed"
inset: 28
available: UsbState.hasMode("hid_mode") && !UsbState.busy
onTapped: UsbState.setMode(
UsbState.mode === "hid" ? "developer" : "hid")
HidController.modeReady ? "developer" : "hid")
}
SheetLocal.PowerOptionRow {
Layout.fillWidth: true
icon: "keyboard_mouse"
title: "Agent hands"
title: HidController.active
? "Close trackpad" : "Open trackpad"
detail: HidController.active
? "Voice, trackpad and the summoned host keyboard"
: "Join the agent to the wire; trackpad first"
? "Leave the wire armed; put its controls away"
: "Voice, pointer, scroll and clicks"
badge: HidController.ready ? "awake"
: HidController.active ? "arm"
: GlobalStates.screenLockSecure ? "locked" : "open"
: HidController.active ? "waking"
: GlobalStates.screenLockSecure ? "locked" : "closed"
inset: 28
available: UsbState.hasMode("hid_mode")
available: HidController.modeReady && !UsbState.busy
&& !GlobalStates.screenLockSecure
onTapped: {
if (Face.joinHands())
if (HidController.active) {
Face.leaveHands();
scope.dismiss();
} else if (Face.joinHands()) {
scope.dismiss();
}
}
}
}