As part of the effort to produce an MT device and gesture testing framework, meet evemu, which provides tools to emulate kernel evdev devices.
Compared to evtest, the major differences are that these tools allow you to:
- first setup a device based on a description
- hook something to it like pymt or mtview, and
- then playback events through the device.
To describe a device in your machine:
$ sudo evemu-describe /dev/input/eventX > device.prop
To record data from your device:
$ sudo evemu-record /dev/input/eventX > device.event
To remotely setup a copy of the device:
$ sudo evemu-device device.prop
The device node will be printed on the terminal, and will stay valid until the program is terminated. To replay the input stream (beware that pointer clicks can execute commands in your window manager):
$ sudo evemu-play /dev/input/eventY < device.event
More interestingly, one can first setup a program like mtview to grab the input:
$ sudo mtview /dev/input/eventY
and then replay the data, which will show every individual finger on the screen.
Given the evemu lib, one can time gestures by first setting up the device, replay gestures on the device, and time the appearance of gestures in grail.
The following are sample instructions for debugging an issue with touch:
- Install the software
Determine the /dev/input/event* node for your device (See Checking your MT device)
Switch to a virtual terminal (VT) by pressing ctrl-alt-f1 or running $ sudo chvt 1
- log in to the VT
$ sudo evemu-describe (insert event node here) > device.prop
$ sudo evemu-record (insert event node here) > device.record
- Swipe a few times on the touch device (touch screen, trackpad, etc.)
- Hit ctrl-c to stop the recording
- Switch back to X by pressing ctrl-alt-f7 or running $ sudo chvt 7 (If that doesn't work, try f8 or f9 or chvt 8 or chvt 9)
evemu-record will end when no activity has occurred for about 10 seconds. So after starting the recording, begin swiping within a few seconds. Then wait until the process finishes.
You can now send the device.prop and device.record files to your friends for their play-back and viewing pleasure
To playback the recorded touch events/gestures, you only need do this:
$ sudo evemu-device device.prop - this will create a new /dev/input/event* node for the virtual device
$ sudo evemu-play (/dev/input/event* node from step 1) < device.record