remote trackpad and keyboard server
git clone https://git.lucas.co/cce-remote.git
fix: scroll factor 0.045 -> 0.8 (finger-px to axis units, ~1:1 natural)
A 300px swipe scrolled ~1 line; axis values reach clients as surface-px
deltas, so near-unity is the trackpad-like feel.
Co-Authored-By: Claude Fable 5 <[email protected]>
index.html | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/index.html b/index.html
index acbd0e1..d54128c 100644
--- a/index.html
+++ b/index.html
@@ -85,7 +85,8 @@ function send(s) { if (authed && ws && ws.readyState === 1) ws.send(s); }
// ── Trackpad ─────────────────────────────────────────────────────────
const pad = document.getElementById("pad");
-const ACCEL = 1.6, SCROLL = 0.045;
+// SCROLL is finger-px → wl axis units (~surface px): 0.8 ≈ natural 1:1 feel.
+const ACCEL = 1.6, SCROLL = 0.8;
// Touch state: one finger moves, two fingers scroll; short still touches
// click; a long-press starts a held drag (release on lift).
let touches = new Map(), moved = 0, startT = 0, maxFingers = 0;