mirror of
https://github.com/MCKero6423/uv-k5-v3-emulator.git
synced 2026-10-07 21:27:30 +00:00
The browser now times the press with performance.now() and posts hold_ms once, instead of sending down and up as two requests. Halves the round trips per key and makes press duration independent of the link. Deletes test_sends_down_and_up_not_just_tap: it asserted the behaviour being replaced, so keeping it would have meant asserting the bug. MIN_HOLD_MS is injected into the page from webui.py so the two agree on the floor, which exists because anything under the firmware's 20 ms debounce does not register at all -- a very fast click still has to ask for 60 ms. Verified over a simulated 400 ms link: three keys in 1.58 s where the old design needed ~2.45 s, and a 120 ms press opens the menu (gScreenToDisplay 0 -> 1) with DOWN then moving the cursor. The generated page also passes node --check.