Settings

Theme

Ask HN: How OS processes mouse events?

2 points by langsamer 15 years ago · 1 comment · 1 min read


I'm curious about a question that came up in my OS class. I understand that a device interrupt schedules an event in an event loop that is then handled by the application or window server. How does this work for mouse move events? Does an event get fired for every mouse-move event? If so, doesn't moving the mouse continuously prevent other interrupts from being fired or does it all happen so fast that it's not noticeable by the human eye.

I realize this is a very trivial question, but I figured this would be the best community to ask. Thanks for your help!

wmf 15 years ago

A typical USB mouse sends 125 events per second and each one probably only takes a few microseconds to process, so there's plenty of time for the computer to do other work.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection