SHIFTy thoughts
Scott Rossi
scott at tactilemedia.com
Mon Oct 11 13:43:51 EDT 2010
Or maybe this:
on openCard
if "trackKeys" is not in pendingMessages() then trackKeys
end openCard
on trackKeys
set the shiftKeyPressed of me to (shiftKey() = down)
send "trackKeys" to me in 50 millisecs
end trackKeys
Recently, I wrote:
> Here's one way to do what you ask:
>
> [in the card script]
>
> on openCard
> if "trackKeys" is not in pendingMessages() then trackKeys
> end openCard
>
> on trackKeys
> set the shiftKeyPressed of me to (65505 is among the lines of keysDown())
> send "trackKeys" to me in 50 millisecs
> end trackKeys
>
> This script sets a custom property (shiftKeyPressed) of the card that you
> can check. You could save the state in a global variable if that's more
> convenient. You also might want to limit key tracking to occur only during
> certain events/states of your app so you're not needlessly polling key
> states.
Regards,
Scott Rossi
Creative Director
Tactile Media, UX Design
More information about the use-livecode
mailing list