Evemu

Introduction

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.

Overview

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.

Debugging

The following are sample instructions for debugging an issue with touch:

  1. Install the software
  2. Determine the /dev/input/event* node for your device (See Checking your MT device)

  3. Switch to a virtual terminal (VT) by pressing ctrl-alt-f1 or running $ sudo chvt 1

  4. log in to the VT
  5. $ sudo evemu-describe (insert event node here) > device.prop

  6. $ sudo evemu-record (insert event node here) > device.record

  7. Swipe a few times on the touch device (touch screen, trackpad, etc.)
  8. Hit ctrl-c to stop the recording
  9. 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 Smile :-)

To playback the recorded touch events/gestures, you only need do this:

  1. $ sudo evemu-device device.prop - this will create a new /dev/input/event* node for the virtual device

  2. $ sudo evemu-play (/dev/input/event* node from step 1) < device.record

Multitouch/Testing/Evemu (last edited 2012-06-14 19:13:49 by c-67-170-185-42)