Re: [racket] Keyboard key state

2012-10-18 Thread Danny Yoo
On Wed, Oct 17, 2012 at 2:21 AM, Laurent 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 m

Re: [racket] Keyboard key state

2012-10-17 Thread Laurent
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

Re: [racket] Keyboard key state

2012-10-15 Thread Matthias Felleisen
It is now possible for the overriding method to hide state from your class. I think if you want to enforce this invariant you need an augmentable method. On Oct 15, 2012, at 10:45 AM, Danny Yoo wrote: > Oh, I forgot about allowing the subclass to process the events too! > Add the following t

Re: [racket] Keyboard key state

2012-10-15 Thread Danny Yoo
Oh, I forgot about allowing the subclass to process the events too! Add the following to the end of the on-subwindow-char method: (super on-subwindow-char receiver key-event) Full source code is here: https://gist.github.com/3892860 Racket Users list: http://list

Re: [racket] Keyboard key state

2012-10-15 Thread Danny Yoo
> Is there a way to get the state map of the keyboard, i.e., to know if some > key is pressed or released, independently of any key-event? > Also, is there a way to know if the num-lock, caps-lock and scroll-lock > states are on or off? Hi Laurent, Sorry; I could not find it so far. I was hoping

[racket] Keyboard key state

2012-10-13 Thread Laurent
Hi, Is there a way to get the state map of the keyboard, i.e., to know if some key is pressed or released, independently of any key-event? Also, is there a way to know if the num-lock, caps-lock and scroll-lock states are on or off? Thanks, Laurent Racket Users list: htt