prevent too fast typing, how to?

Kay C Lan lan.kc.macmail at gmail.com
Wed Mar 7 20:20:41 EST 2007


Ooops. forgot to mention that on my Mac the 0 rawKeyDown code is 48. I don't
know why this should be different on different platforms but you allow for
that with these simple amendments.

>
>
> -------
> local lMyDuplicate
>
> ON rawKeyDown theNumber
>  SWITCH


CASE ((theNumber = 48) AND (lMyDuplicate = 0))

  CASE ((theNumber = 90) AND (lMyDuplicate = 0))
>    put 1 into lMyDuplicate
>    pass rawKeydown
>    break
>   CASE ((theNumber = 90) AND (lMyDuplicate = 1))
>    beep
>    break
>   CASE (theNumber <> 90)
>    put 0 into lMyDuplicate
>    pass rawKeydown
>    break
>  END SWITCH
> END rawKeyDown
>
> -------
>
> HTH
>



More information about the use-livecode mailing list