Re: Programmatically invoking Exposé?
Re: Programmatically invoking Exposé?
- Subject: Re: Programmatically invoking Exposé?
- From: "Brian Kendall" <email@hidden>
- Date: Thu, 27 Mar 2008 10:14:45 -0400
The way I've done it, and mind you this is a bit of work and it's
certainly not ideal, is to read the contents of
com.apple.symbolichotkeys.plist to figure out what the current hotkey for
any of the Expose actions are, and then use CGEventCreateKeyboardEvent and
CGEventPost to synthesize a keystroke in order to invoke it.
If you look inside com.apple.symbolichotkeys.plist you'll find all sorts
of unlabeled entries in an array, each referring to various hotkeys. The
ones specifically for expose are: 32 (expose all), 33 (expose
application), and 36 (expose desktop). Then, inside each entry is a value
dictionary, containing a parameters array. In the parameters array, the
entry with index 1 is the keycode for the hotkey, and index 2 is the
modifier keys.
Of course, this method fails the user specifically has disabled the hotkey
for any of the various Expose functions. Like I said, it's a bit of work
and it's not ideal. It'd be nice if there was an official
Apple-sanctioned way of invoking Expose, but I don't think there is one.
(Other than invoking Expose.app, but that only seems to get you one of the
three kinds of Expose.)
- Brian
On Thu, 27 Mar 2008 04:17:03 -0400, Rick Mann <email@hidden>
wrote:
Is there any way to programmatically invoke Exposé?
TIA,
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden