bogdansrc
bogdansrc

Reputation: 1344

Sleep Display Cocoa/Carbon

I'm trying to make my application sleep the screen.

I've looked into pmset with no success and I even tried IOHIDPostEvent. I can get IOHIDPostEvent to press the Eject key but setting the shift and control flags has no effect.

Any help is greatly appreciated.

Upvotes: 1

Views: 592

Answers (1)

Nicholas Riley
Nicholas Riley

Reputation: 44331

Don't believe there is a public API yet (please file a bug), but some code is here.

Upvotes: 1

Related Questions