Re: Tk: how to handle platform differences in keyboard autorepeat?
- From: Donald Arseneau <asnd@xxxxxxxxx>
- Date: 28 Sep 2006 05:41:20 -0700
Ralf Fassel <ralfixx@xxxxxx> writes:
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?
I think so, yes. I did something like that a while back ... I wonder
where it is. As I recall, there was zero delay between some events,
probably release--press.
http://groups.google.com/group/comp.lang.tcl/browse_thread/thread/bdd9524e3e766ab2
--
Donald Arseneau asnd@xxxxxxxxx
.
- Follow-Ups:
- Re: Tk: how to handle platform differences in keyboard autorepeat?
- From: Ralf Fassel
- Re: Tk: how to handle platform differences in keyboard autorepeat?
- References:
- Tk: how to handle platform differences in keyboard autorepeat?
- From: Ralf Fassel
- Tk: how to handle platform differences in keyboard autorepeat?
- Prev by Date: Re: Why no central repository for tcl extensions?
- Next by Date: Re: Why no central repository for tcl extensions?
- Previous by thread: Tk: how to handle platform differences in keyboard autorepeat?
- Next by thread: Re: Tk: how to handle platform differences in keyboard autorepeat?
- Index(es):