Hacker News new | ask | show | jobs
by itsajoke 2239 days ago
I did a little research into this. This website [1] mentions something I'd never heard of before. That some browsers "collapse" real mouse events into fewer "fake" events that tie the event poll rate to your monitor's refresh rate. Even though I'm using Firefox and not Chrome like they mention, I'm seeing that exact phenomenon. The highest number of mouse events I can seem to generate is 60 per second.

However, this other website [2] is showing me events on the order of up to 124 Hz. Either that site is doing something special or it's lying. The JavaScript there is decently obfuscated. I'm going to spend a few minutes trying to deobfuscate it and see what I can find out.

[1] https://www.vsynctester.com/testing/mouse.html

[2] https://zowie.benq.com/en/support/mouse-rate-checker.html

1 comments

I think I sussed out the secret sauce from that Benq website. They're using the experimental getCoalescedEvents [1] function to uncollapse the mouse events!

[1] https://developer.mozilla.org/en-US/docs/Web/API/PointerEven...

I’ve seen some systems use a Bézier curve to a make a realistic stroke with limited data points.