In Windows, pressing Windows-D will show the desktop. How to implement that in for OS X?
Asked
Active
Viewed 321 times
-4
-
1OSX has Exposé that is triggered by F11 .. however I don't think that there is an API for it. – Peter M Feb 14 '12 at 03:02
-
The user can change those shortcuts, so that method is unreliable. – danielbeard Feb 14 '12 at 03:06
-
why the downvotes? What's wrong with this question? – user4951 Feb 15 '12 at 07:16
2 Answers
2
This will hide all other applications than the sender.
-[NSWorkspace hideOtherApplications]
Link to documentation: https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSWorkspace_Class/Reference/Reference.html#//apple_ref/doc/uid/20000391-hideOtherApplications

danielbeard
- 9,120
- 3
- 44
- 58
0
If you want to programatically trigger Exposé here is a blog that seems to go down the only usable path: Triggering Dashboard, Exposé and Spaces Here is a SO question that goes down this path: calling-app-expose-in-lion
Another solution is this SO question: expose-effect-in-a-mac-application which may be a better way of doing things