Linux, how to capture screen, and simulate mouse movements

前端 未结 4 957
春和景丽
春和景丽 2020-12-13 07:41

I need to capture screen (as print screen) in the way so I can access pixel color data, to do some image recognition, after that I will need to generate mouse events on the

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-13 08:04

    Swinput is a solution for simulating mouse/key events. You need to compile it probably for your kernel. Xorg provided some headers for recording mouse/key events but I think it is broken at the moment. There is a C code evtest that can be used to capture events from /dev/input/eventX, /dev/input/mice files. It can be helpful.

    Edit:

    The bug was fixed in Xorg record extension, so it may be working too.

提交回复
热议问题