How to read low level mouse click position in linux .

前端 未结 2 681
春和景丽
春和景丽 2020-12-28 09:11

I am using this code to read mouse events from the dev/input/event* in linux .

#include 
#include 
#include 
         


        
2条回答
  •  不知归路
    2020-12-28 09:33

    A mouse only sends relative movement, not absolute position. You have to keep track of it yourself, and when you receive a mouse-button event you have to check your own coordinates for the position.

提交回复
热议问题