Tk: how to handle platform differences in keyboard autorepeat?



When the user presses a key continuouly, keyboard autoreopeat kicks in
and sends events to the application:

Windows:
<KeyPress-*> // pause
<KeyPress-*> // short pause
<KeyPress-*> // short pause
...
<KeyRelease-*>

Linux:
<KeyPress-*> // pause
<KeyRelease-*> // short pause
<KeyPress-*> // short pause
<KeyRelease-*> // short pause
...
<KeyPress-*> // short pause
<KeyRelease-*> // short pause

How do I handle these differences? E.g if I want to simulate the
loading of a spring: as long as the user presses a key, the spring
gets compressed more and more, and gets released as the user releases
the key. Do I have to take the arrival time of the events into
account and dismiss repeated events if the delta-t is < 1ms?

R'
.