How could I watch the mouse for special events, like when the scroll wheel is pushed?
E.g. When the mouse wheel is pressed, the shell would execute echo "hello".
The OS is Linux.
Is there some API in X.org that I can use?
How could I watch the mouse for special events, like when the scroll wheel is pushed?
E.g. When the mouse wheel is pressed, the shell would execute echo "hello".
The OS is Linux.
Is there some API in X.org that I can use?
You're trying to get mouse events into a console program?
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Ah, I don't know, I just want it to run on the background and perform an action whenever the wheel mouse is clicked.
Any ideas?