-4

In Windows, pressing Windows-D will show the desktop. How to implement that in for OS X?

Cœur
  • 37,241
  • 25
  • 195
  • 267
user4951
  • 32,206
  • 53
  • 172
  • 282

2 Answers2

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

Community
  • 1
  • 1
Peter M
  • 7,309
  • 3
  • 50
  • 91