mirror of
https://github.com/lhns/steam-frame-nix.git
synced 2026-10-06 01:00:13 +02:00
keyboard.vr.touchTyping (off by default): a key is pressed when a controller's tip, where SteamVR's laser starts (/pose/tip: the device pose times the render model's "tip" component), passes through it from the front; released when pulled back 1 cm, re-armed 5 mm in front. Both hands, also at once. Keys go through the keyboard's own HandleTouchStart / HandleTouchEnd, like a laser press (Backspace repeats while held). Options depth (cm) and haptics. The geometry lives in a reusable controller bridge (vr-keyboard-controllers, internal option): a systemui patch reads the keyboard's pose with SteamVR's SGQueryService (an empty transform of ours in the keyboard's mount) and both controllers' poses, and streams per hand the tip, the laser's hit on the keyboard and the trigger (~90 Hz while relevant) through the vr-keyboard-controllers-relay service to __sfuiControllers in Steam's SharedJSContext. Tests: flake checks vr-keyboard-controllers and vr-keyboard-touch.
11 lines
354 B
JavaScript
11 lines
354 B
JavaScript
// Reverts bridge-patch.js in SteamVR's systemui page: stops the loops (a last
|
|
// { keyboard: null } frame) and removes the keyboard probe transform. Safe
|
|
// when nothing is patched.
|
|
(() => {
|
|
const S = window.__sfuiCtl;
|
|
if (!S) return 'not patched';
|
|
try { S.dispose?.(); } catch { /* gone */ }
|
|
delete window.__sfuiCtl;
|
|
return 'unpatched';
|
|
})()
|