• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Detecting a keydown or key up.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Detecting a keydown or key up.
      • From: "Zavatone, Alex" <email@hidden>
References: 
 >Detecting a keydown or key up. (From: "Zavatone, Alex" <email@hidden>)
 >Re: Detecting a keydown or key up. (From: Stan Cleveland <email@hidden>)

  • Prev by Date: Re: AppleScript-Users Digest, Vol 8, Issue 343
  • Next by Date: Re: Two Monitors
  • Previous by thread: Re: Detecting a keydown or key up.
  • Next by thread: Re: Detecting a keydown or key up.
  • Index(es):
    • Date
    • Thread