I\'m wondering how to get the MouseClick and MouseMove events in bash scripting for my own simple OS events.
Please tell me how to get that events.
Based on the precious informations given here, and after a bit of digging around.
We can catch mouse downs and releases, the wheel movement and side, the middle click (wheel click), and positions. No right click.
The following is only an example in php, used as cli. It hide the movements printing on the terminal, and set it back properly when quiting.
It is verbose enough to be adapted in any programming langs able to read the STDIN and print to STDOUT, so surely a big list of them!
#!/usr/bin/php