当前位置: 动力学知识库 > 问答 > 编程问答 >

c - How to control mouse cursor by sensor?

问题描述:

I have just finished infrared hand motion recognition and tracking project.

i made Gui on QT creator that works like: mouse cursor of GUi moves if i move my hand over the sensor. Sensor gives X and Y coordinates. Also sensor can recognize many hand gestures and i can control slide pictures click on the picture and slide them zoom in zoom out.

But i made them only on the QT GUI.

My question:

I want to control real mouse cursor. i mean i want to make the sensor as a real mouse. so that works instead of mouse.

But i can not find information how to connect sensor output to the mouse control.

Or is there any way that i can control my PC mouse, zoom in out, slide, scroll and more controls by my sensor?

please give some resource of that lesson or anything that i can follow

网友答案:

In case you're using Linux:

Of course you could always write a kernel module (but I guess you wouldn't be asking if that was an option).

It is also possible to create input devices from userspace (which will show up in /dev/input just as phisical devices). The API is quite well documented in <linux/uinput.h> and <linux/input.h>. You can choose yourself what kind of device(s) you want to create.

分享给朋友:
您可能感兴趣的文章:
随机阅读: