Skip to content

lightgun-poc / lib/gnome / openGnomeInput

Function: openGnomeInput() ​

openGnomeInput(deps): GnomeResult

Defined in: lib/gnome.ts:445

Opens the remote-control session. Every failure — no session bus, not GNOME, a library that will not load — comes back as a reason, never a throw, so callers can fall back and explain.

Aim moves are fire-and-forget messages (they must never block the 2ms cursor loop on a round trip), which also means a session GNOME has closed fails silently. Hence the liveness check: one move every healthMs waits for its reply, and a failure re-creates the session. Button and key events always wait — they are rare, and a lost click is worse than 1ms.

Parameters ​

deps ​

GnomeDeps

Returns ​

GnomeResult

Released under the MIT License.