XTestFakeKeyEvent broken in Xvfb

Clemens Eisserer linuxhippy at gmail.com
Mon Oct 10 12:06:43 PDT 2005


Hello again,

I am since some time experimenting with an application running in an
Xvfb-instance which is controlled via XTest.

One problem that showed up is that it is not possible to reliable
simulate key-events when running in Xvfb, whereas a "native" X-Server
does not cause any problems.
Some key-events are received by the client-application twice, others
get completly lost.

I first thought this is a specific problem of the library I used for
this task (java.awt.Robot class in java) and wrote my own library in
plain C using XTest (again, sorry for the accidently post with the
forgotten XFlush) which is heavily based on the code of Xvkbd-2.7 and
it shows exactly the same sympthoms. If I insert a wait of 200ms after
each key everything works like expected with both libraries (100ms do
not work).

For my testing I used Xvfb delivered with Xorg-6.8.2, running with the
following flags:
Xvfb :1 -screen :1 500x1000x24 -fbdir /tmp/

Any ideas? Of course I am willed if someone want to take a look at the
problem, I already went through its source but, :-(

lg Clemens



More information about the xorg mailing list