正确的方法来发送X11鼠标事件 [英] Correct way to send X11 mouse events

查看:184
本文介绍了正确的方法来发送X11鼠标事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想写可以使用触摸屏Android手机上的移动和点击鼠标的X11输入驱动器。我已经得到了移动鼠标还好,但我有麻烦的应用程序正确识别的点击次数。我现在的code是在达 https://gist.github.com/3981cedec9d5c55af15f

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?

推荐答案

如果你正在写一个驱动程序,为什么使用合成输入事件,而不是写一个X服务器驱动模块,即得到由X服务器加载?我开始用的xf86-输入了evdev驱动器作为出发点,并根据需要重写。

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的/驱动器/ XF86-输入了evdev /树/?H =主

这篇关于正确的方法来发送X11鼠标事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆