开发者

Correct way to send X11 mouse events

开发者 https://www.devze.com 2023-03-14 15:42 出处:网络
I am trying to write an X11 input driver that can use the开发者_如何转开发 touchscreen on my Android phone to move and click the mouse. I\'ve gotten moving the mouse alright, but I\'m having trouble g

I am trying to write an X11 input driver that can use the开发者_如何转开发 touchscreen on my Android phone to move and click the mouse. I've gotten moving the mouse alright, but I'm having trouble getting the clicks recognized correctly by the applications. My current code is up at https://gist.github.com/3981cedec9d5c55af15f .

First of all, when I click on a background window, it becomes the primary window, but it does is not moved to the front of the screen. Second of all, if I right click, the entire screen becomes unresponsive to my clicking. Finally, clicking on the window buttons (close, minimize, maximize) don't seem to do anything. Are there any events that I am not sending?


If you're writing a driver, why are using synthetic input events, instead of writing a X server driver module, that gets loaded by the X server? I'd start with the xf86-input-evdev driver as a starting point and rewrite it as needed.

http://cgit.freedesktop.org/xorg/driver/xf86-input-evdev/tree/?h=master

0

精彩评论

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

关注公众号