Ubuntu: Injecting touch events



Question:

Sorry if I seem a little green to the Linux/Ubuntu world. Its because I am.

On Windows 10 there is a C API called "InjectTouchInput" where you can inject a touch event into the system and it is handled as if were a touch screen sending touch events.

Is there an API like this in Linux or Ubuntu?

I am not interested in shell scripts, I want to write a C/C++ program to mimic touch events.


Solution:1

You can inject multi-touch (and other input) events into the X11 server using the XTest extension.

You can inject various input events into the kernel using the evdev interface.

Neither is pretty and closer to a hardware than to an OS-level API.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »