[racket] Keyboard key state

From: Danny Yoo (dyoo at hashcollision.org)
Date: Thu Oct 18 14:14:35 EDT 2012

On Wed, Oct 17, 2012 at 2:21 AM, Laurent <laurent.orseau at gmail.com> wrote:
> Thank you very much Danny. That may have been a good near-solution, but
> unfortunately keystrokes like NumLock, CapsLock and friends are not caught
> by the event handler (CapsLock is caught, though, but not as a standalone
> event), at least on my machine(s).
> Also, in fact, I wanted among other things to check the state of NumLock on
> application start, prior to any keystroke.
> Thanks anyway, maybe I'll take a closer look at the source code.

Yes, if you could figure out how to detect those, that would be good!
(Last I checked, DrRacket is sometimes silly because it does not
distinguish Control keys when the caps lock is on, leading to funny
interactions sometimes.)

The code in mred/private/wx wraps a common interface around the
particularities of the three major GUI platforms.  So maybe it's just
a matter of extending that interface and adding the appropriate code
for them.  I haven't taken time to look at it much yet.

Posted on the users mailing list.