I am in a project where I will need to write a simple driver that accepts input from a USB device and preforms actions on GUI according to the received msg (Like writing a usb mouse driver but with my own protocol).
I am searching the possibility of this and I found software testing automation tools like LDTP that already can generate actions like mouse clicks and keyboard hits .
Are there other APIs to use ? How long it will consume given that my team has good understanding of C language and no experience with Linux ?
I am in a project where I will need to write a simple driver
Share
You have basically two options, that I can think of:
XTestFakeDeviceKeyEvent,XTestFakeRelativeMotionEvent, etc.)The first one makes use of fake input devices (try running
xinput listin the shell) that are present in most (all?) X servers. Each call to one of theXTestFake*function generates an X input message.The second one is a kernel module that allows a user application to create input devices and send input events. You simply open the
/dev/uinputdevice, send a fewioctls to configure it, and thenwritethe input events directly.And, of course, you can write an input kernel driver!