Handhelds.org - Open source for handheld devices

UserPreferences

GeneratingSyntheticX11Events


Generating synthetic events in X

Both HandwritingRecognition and VirtualKeyboards need some sort of mechanism to send synthetic events to a window. In X, this can be done in two different ways:

  1. XTestFakeKeyEvent (part of the XTest extension)

  2. XSendEvent

When I asked which method is preferred, all answers I received favor XTest over XSendEvent. Here are some replies:

From JimGettys::

From KeithPackard::

In addition, I wrote a program twice using each of these methods. I found that XTestFakeKeyEvent was much easier to use than XSendEvent.

CarlWorth