VR keyboard swipe with two controllers: the path from the controller bridge

With both lasers on the keyboard SteamVR forwards per poll only one laser's
movement, so the pressing one may get no touchmoves and its swipe became a
tap. keyboard.vr.swipe.twoHanded (default on; turns on the controller
bridge): a press is attributed to the hand whose laser hit is nearest to it
(within 30 px, the trigger as a tiebreak; without recent frames the first
frame after the press decides, within 60 px). The path comes from runs of
one source: the touch's own moves while they flow, that hand's laser hit
per bridge frame once they pause for 60 ms, touchmoves again if frames
pause. A touchend disagreeing with the laser during a bridge run ends at
the laser. Touchmoves on the other hand's laser move the attribution.
Without fresh frames: touch events only, as before. A second press during
a swipe stays Steam's tap (one text field, one word at a time).

The bridge sends full rate only on demand now: hub.js demand(ms) goes
back through the relay (CDP binding __sfuiCtlIn) to systemui's
__sfuiCtl.demand; the swipe patch asks from the press to the release.

Tests: gesture-input with the two-controller recording and synthetic bridge
frames (a pressing hand without touchmoves, attribution with both lasers on
the keyboard, a stale bridge, frames stopping mid-swipe, re-attribution,
interleaved hover and presses); hub demand.
This commit is contained in:
Pierre Kisters committed 2026-10-01 03:45:47 +02:00
1 parent 0699d0f532
commit af32cf72ce
13 files changed
+423 -53

No files matched your search

+2 -2
View File
@@ -104,7 +104,7 @@ modules/
swipe-decoder.js Steam (argument of patch.js): swipe path -> words
textmodel.js Steam (argument of patch.js): what the keyboard typed
corrector.js Steam (argument of patch.js): corrections, completions
gesture-input.js Steam (argument of patch.js): a gesture's own events
gesture-input.js Steam (argument of patch.js): a gesture's own events, its hand's bridge path
suggestions-panel/
patch.js, unpatch.js SteamVR: the strip as a panel above/below the keyboard
relay.mjs service vr-keyboard-relay: strip state Steam <-> SteamVR
@@ -116,7 +116,7 @@ modules/
bridge-patch.js, unpatch.js SteamVR: keyboard pose, tips, laser hits, triggers
geometry.js SteamVR (argument of bridge-patch.js): tip/laser -> keyboard
hub.js Steam (argument of consumer patches): __sfuiControllers
relay.mjs service vr-keyboard-controllers-relay: frames SteamVR -> Steam
relay.mjs service vr-keyboard-controllers-relay: frames SteamVR -> Steam, demand back
check.nix, tests/ test: geometry, hub
vr-keyboard-touch.nix touch typing (keyboard.vr.touchTyping)
vr-keyboard-touch/