I'd like to test how well my Linux app works on Linux-based touch devices. Unfortunately, I don't have such a device, which is why I'd like to find a way to simulate touch gestures on a standard laptop.

Is there a way to do that? How?


1 Answer 1


You should search for uinput and evdev with evtest. If you can get a list of touch events from someone with a real device, using evemu-record, you can replay them with evemu-play. See Understanding evdev to see how you can log absolute x and y events from a touchscreen device, such as EV_ABS / ABS_X, EV_ABS / ABS_Y and a touch such as EV_KEY / BTN_TOOL_FINGER. You can put these in a file, edit them and add your own, and replay the result with evemu-play, or send one event with evemu-event. There are C and Python api's to create UInput devices and send events through them (tutorial).

This too-detailed pdf, The Linux input driver subsystem may help you recognise some of the events you need to emulate.

  • Thanks for the tip! Sounds pretty complicated, we'll see if I get around to it.
    – Tin Man
    Commented Mar 1, 2023 at 19:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .