Re: Detecting a keydown or key up.
Re: Detecting a keydown or key up.
- Subject: Re: Detecting a keydown or key up.
- From: hvarlist <email@hidden>
- Date: Wed, 03 Aug 2011 10:39:32 +0200
Here is another approach. The attached shell script returns a string of the keys currently pressed:
set modKeys to do shell script (quoted form of "/Library/Application Support/getkeys")
--> "shift command capslock "
--> "option "
--> "control shift "
etc
Parse the string as needed.
HÃ¥vard
(... is it OK to post attachments here?)
Den 2. aug. 2011 kl. 22.03 skrev Stan Cleveland:
> On Aug 2, 2011, at 8:25 AM, Zavatone, Alex wrote:
>
>> I've been looking around with google and wonder if, in this modern age, we still have to monkey around to detect a key's state? Particularly the modifier keys?
[see attached file: getkeys.zip]
Attachment:
getkeys.zip
Description: Zip archive
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden