mirror of
https://github.com/lhns/steam-frame-nix.git
synced 2026-10-06 06:00:22 +02:00
VR keyboard bridge: adaptive sampling, on demand only without touch typing
The controller bridge reads the poses with setTimeout instead of a fixed 11 ms interval: the next read after (distance - 10 cm) / 2.5 m/s, 11-250 ms, the distance being the nearest tip's to the keyboard's rect plus a margin, so a hand up to 2.5 m/s is read within 10 cm before it reaches the surface (the tracker's crossing and 8 cm jump guard see 11 ms steps as before). Full rate during a demand or with a pulled trigger. Without touch typing (controllers.continuous, set by vr-keyboard-touch) no reads while the keyboard is shown until a swipe demands them; a demand starting reads at once. Bridge VERSION 6. Tests with a fake clock: bridge.test.mjs.
This commit is contained in:
1 parent
1612c162fb
commit
57ed00e29c
6 files changed
+341
-28
No files matched your search
@@ -2,7 +2,7 @@
|
||||
# key is pressed when a controller's tip (where SteamVR's laser starts)
|
||||
# passes through it. Independent of keyboard.vr.enable / extraKeys.
|
||||
# - The tips relative to the keyboard come from the controller bridge
|
||||
# (vr-keyboard-controllers.nix, turned on here).
|
||||
# (vr-keyboard-controllers.nix, turned on here, sampling continuously).
|
||||
# - vr-keyboard-touch/keyboard-patch.js (Steam UI, 8080; patch
|
||||
# "vr-keyboard-touch"): tracker.js per hand (contact, hysteresis); presses
|
||||
# the key with the keyboard's own touch handlers, like a laser press.
|
||||
@@ -36,6 +36,7 @@ in {
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
steamFrame.keyboard.vr.controllers.enable = true;
|
||||
steamFrame.keyboard.vr.controllers.continuous = true;
|
||||
steamFrame.uiPatches.patches = [ {
|
||||
name = "vr-keyboard-touch";
|
||||
target.title = "SharedJSContext";
|
||||
|
||||
Reference in new issue
Block a user