plover/plover — pull request #112 by benoit-pierre (2013-07-30 14:11:32+00:00)
Title: Improve X11 keyboard emulation.

Using LibreOffice, a lot of words are jumbled, e.g. 'sometimes' will appear as 'ssommeeti' or 'sommeetis', 'understand' as 'unnddersta' or 'unnderstad'. Notice how its always a repetition of some keys. My own problems with IBus and auto-repeated events got me thinking: older applications don't use XkbSetDetectableAutoRepeat to detect them, but use a hack similar to the first answer here:

http://stackoverflow.com/questions/2100654/ignore-auto-repeat-in-x11-applications

And in the code we actually send all simulated key press/release events with a time of 0. So this patch makes sure every key event time is different than the previous one, to
avoid some applications thinking its an auto-repeat.