English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
labltk bind ~events list questions/bugs?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-01-03 (14:02)
From: John Max Skaller <skaller@o...>
Subject: Re: labltk bind ~events list questions/bugs?
Jacques Garrigue wrote:
> From: Chris Hecker <checker@d6.com>
> > 2. As another question, if I have ~events:[`Modified
> > ([`Shift],`KeyPress)], sometimes I just get the keys that were pressed
> > when the shift key was down, sometimes I get a zillion Shift_L events,
> > and sometimes I get nothing.
> Stranger. This should be only the first case. At least, this is how it
> works on X11.

	Here's my guess: this is a 'quirk' of the PC keyboard firmware.
It is a serious problem for game design. What happens is that
when there are NO keys pressed, and you press any repeating key,
you get a sequence of KEY_DOWN tokens from the keyboard.
If you then press another key, the auto-repeat is switched OFF
for the first key, and on for the second key. If you release
the second key, the first doesn't auto-repeat: 

        ^ press 1  ....^ press 2     ^ release 2  ^ release 1

	^ press a        ^ press shift

	The _only_ solution is to reprogram the keyboard CPU.
The whole thing is a stupid hangover from DOS: the keyboard
should just send keyup/keydown tokens, and let the OS driver
handle repeats and timing.

John (Max) Skaller, mailto:skaller@maxtal.com.au
10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850
checkout Vyper http://Vyper.sourceforge.net
download Interscript http://Interscript.sourceforge.net