• 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
Determining Spotlight hot keys
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Determining Spotlight hot keys


  • Subject: Determining Spotlight hot keys
  • From: Stephen Jonke <email@hidden>
  • Date: Wed, 8 Jun 2005 11:27:13 -0400

This is related to me query about "bitwise operations". I'm trying to figure out what key and modifiers are set for Spotlight by reading the com.apple.spotlight.plist. The key is straightforward and can be issued as is via "key code", but the modifiers are encoded as large numbers and "key code" takes a key code and a list such as this: {command down, shift down}. I find that adding the key code and modifier values and using that as the "key code" does not produce the desired result. So instead I'm trying to figure out which bits are set in the modifier value so I can determine the proper modifier keys. It appears that the modifier value is encoded as follows:

KEY       DECIMAL    BINARY
-------   -------    --------------------------
command   1048576    1 0000 0000 0000 0000 0000
option     524288    0 1000 0000 0000 0000 0000
control    262144    0 0100 0000 0000 0000 0000
shift      393216    0 0010 0000 0000 0000 0000

So I just need to test each of those bits and that gives me the modifier keys and then I can invoke Spotlight without needing to have the user set properties that reflect the current spotlight key settings.

I.e. I need "bitwise AND"

Steve
_________________________________________________________________
Stephen Jonke                                  email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Folder action in download folder...
  • Next by Date: Acrobat 6 question ... Reduce File Size...
  • Previous by thread: Re: OT: Re: Shit - it's all true
  • Next by thread: Re: Determining Spotlight hot keys
  • Index(es):
    • Date
    • Thread