Capslockkey function

Robert Brenstein rjb at robelko.com
Sun Mar 19 14:32:54 EST 2006


>Thanks Eric
>
>That's a very good solution. But can I do this in a rawkey handler?
>
>The field is a number only field and I have to limit it so the user 
>is only allowed to type numbers. No space or return.
>I also want to either give the user a warning that the capslock key 
>is on or to translate the capslocked typing into numbers.
>
>The best solution I have now is to translate each rawkey into the 
>rawkey of the number. Thats 10 lines of code.
>But I would rather have a warning....
>
>The capslockkey function does not seem to report anything other than 
>the "up" state on my system.
>I'm using rev 2.7 in XP
>
>Jan
>
>

But capslock should not affect typing numbers AFAIK.

return or enter are easy to handle with returnkey and enterkey handlers.

space and other non-numeric character can be checked and reported or 
simply weeded out in closeField.

Robert



More information about the use-livecode mailing list