Browse thread
labltk bind ~events list questions/bugs?
-
Chris Hecker
-
Jacques Garrigue
- John Max Skaller
- John Max Skaller
-
Jacques Garrigue
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| 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:
11111111111111122222222222222
^ press 1 ....^ press 2 ^ release 2 ^ release 1
aaaaaaaaaaaaaaaaa
^ 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