how to get MouseMove and MouseClick in bash?

后端 未结 6 773
野的像风
野的像风 2020-11-30 04:19

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.

6条回答
  •  渐次进展
    2020-11-30 04:36

    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
    

提交回复
热议问题