Capslockkey function
Jan Sælid
janselid at broadpark.no
Sun Mar 19 14:56:54 EST 2006
Eric Chatonet gave me this great and short solution to my problem:
---
you can use a simple keydown handler:
on keyDown pKey
if pKey is an integer then pass keyDown
end keyDown
This will allow to type numbers only and use the delete key.
No more :-)
---
Easy as that! By the way I think that the problem with the capslockkey
function must be a bug in 2.7 for windows
I've reported it to bugzilla.
Thanks everyone to the response!
Jan
----- Original Message -----
From: "Robert Brenstein" <rjb at robelko.com>
To: "How to use Revolution" <use-revolution at lists.runrev.com>
Sent: Sunday, March 19, 2006 8:32 PM
Subject: Re: Capslockkey function
> >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
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list