开发者

How can i simply detect mouse movement in python?

开发者 https://www.devze.com 2023-02-17 20:08 出处:网络
How can i detect mouse movement in a python script in linux? I want to then send those events to a handler which will dispatch that where i can process it later.

How can i detect mouse movement in a python script in linux?

I want to then send those events to a handler which will dispatch that where i can process it later.

There is no gui installed if that matte开发者_开发技巧rs.


You could try reading /dev/input/mice.


You can read from the event device node. But the data is a stream of structures. Here is some python code that does that already. You can use it as an example (or just use it). :-)

0

精彩评论

暂无评论...
验证码 换一张
取 消