Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Mouse event handling in Kernel

    I want mouse events to be created automatically by a script such that it sends those events to Qt app. For this, I capture the touch screen events from the device file while touching the screen and then write those captured events to the same device file ("/dev/input/event0"). When I touch the screen, mouse cursor moves accordingly but when I write the same events to device file there is no movement in mouse cursor. Could anyone please help?

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Actually, you probably need to inject the events into the X input event queue. It has been about 15 years, but back then I did something like what you want so I could use an analog joystick (plugged into the PC game port) to replace a mouse. It will take some time to dig out my code to do that, but it did work for me!
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts