Test for Command Key?

J. Landman Gay jacque at hyperactivesw.com
Wed Feb 16 13:44:13 EST 2005


On 2/16/05 3:21 AM, Scott Rossi wrote:

> Recently, I wrote:
> 
> 
>>Is the only way to do this by using the keysDown
>>function within a looping script?
> 
> 
> Actually, this doesn't seem to work either.  The only way I've found to
> check if the command key is down is using the cmdKey function within a
> looping script.
> 
> Is there another way that avoids a script loop?
> 
> (mouseMove is unfortunately not an option since the cursor may be stationary
> when the key is pressed.)

I think Windows may report the state in a rawkeydown message, but Mac OS 
does not report the state of the command key unless it is paired with an 
alpha-numeric key. Plain old "command" doesn't send any message. It's an 
OS limitation.


More information about the use-livecode mailing list