Injecting touch events

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.

1 Answer

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.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like