关于c/c++中的鼠标控制[ubuntu] gnome 还是 kde ???大概
关于c/c++编写鼠标控制模块的几个问题 非常感谢任何评论。
我有一部可以连接到我的 ubuntu 11.04 笔记本电脑的手机 通过无线网络。 我为诺基亚 symbian s60 v3 安装了腻子。
使用putty,我可以执行诸如mplayer之类的命令来播放 当我躺在床上时听音乐。
问题是putty无法直接控制鼠标。
我在想是否可以编写一个接收箭头键信号的程序 从我的腻子中并将鼠标从桌面上移开。 然后,当我通过我的电脑进行演示时,我可以控制我的笔记本电脑 手机。
如果有人知道如何处理,请给我一些建议。 我应该从哪里开始?我必须使用哪些 c/c++ 头文件/库。 我应该看一下的任何网站或在线手册。
我正在运行 unity (基于 gnome 2.3。对吗?)
谢谢。 灌南
Several questions about how to write a mouse controlling module in c/c++
Any comments are much appreciated.
I have a mobilephone which can connect to my ubuntu 11.04 laptop
through wireless network.
I installed a putty for nokia symbian s60 v3.
With putty, I can execute commands such like mplayer in order to play
music when i am in my bed.
The problem is putty cannot controll mouse directly.
I am thinking if I can write a program who receives arrow keys signals
from my putty and move the mouse from my desktop.
Then I can control my laptop when I am doing a presentation through my
mobile-phone.
If anyone knows how to deal with it, please give me some advices.
Where should i get started? which c/c++ header/libs that i have to use.
Any websites or online mannual that i should take a look at.
I am running unity (based on gnome 2.3. right?)
Thanks.
Guannan
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这在linux/X window系统上其实并不简单,但是是可以做到的。您的答案可能是以下之一:
设置 xtest,以便您可以将鼠标事件注入窗口系统
告诉窗口管理器从某种“假鼠标”获取输入 - 也许您可以告诉它命名管道甚至 pty 是串行鼠标?
制作或找到一个内核驱动程序,在 /dev/input 下为您提供另一个鼠标条目,您可以将来自其他程序的鼠标事件推送到该驱动程序
This is actually not simple on linux/X window system, but it can be done. Probably one of the following would be your answer:
set up xtest so that you can inject mouse events into the window system
tell the window manager to take input from a "fake mouse" of some sort - maybe you can tell it that a named pipe or even pty is a serial mouse?
make or find a kernel driver giving you another mouse entry under /dev/input to which you can push mouse events from some other program