On Thu, 9 Dec 1999, Mark Lacy wrote:

> Can anyone share with me how to check if the user has pressed the num lock key and 
>then keep them from actually changing its state. 
> 
> I am doing a software simulation so I need to know if they tried to press the "num 
>lock key", yet I have to keep them from actually turning it off.
> 
> I have played with the rawkeydown message and I get a code that "I believe" is for 
>the num lock key but then, the numlock keystate still changes even though I am not 
>explicitly passing the message on after intercepting it.
> 
> Has anyone dealt with this key before or have any suggestions for how to best handle 
>this?

You can use the rawKeyDown handler to detect the state change, but I
don't know of any way to actually change the state of the light on the
keyboard (or the OSs perception of the state of that key) other than
using an external.  If this is on Windows or UNIX, you can probably
find a program to do this that you could run with shell() or open
process, but I don't know off hand where you'd find such a program.

Another thing to consider would be to just override *all* of the
keyDown events and do entry based on the parameter to the rawKeyDown
message.  That way it wouldn't matter what the state of that key was.
  Regards,
    Scott

> Regards,
> 
> Mark Lacy
> LetterPress Software
> 
> 

********************************************************
Scott Raney  [EMAIL PROTECTED]  http://www.metacard.com
MetaCard: You know, there's an easier way to do that...

Reply via email to