문제

How can I detect when a screen shot selection (cmd-shift-4) is in progress?

I have a custom window that I’m trying to make behave like a menu (it comes out of a status item). Part of this behavior is dismissing it when the user clicks on something else, which I detect using a CGEventTap. One case where I don’t want a click to dismiss is when it’s the start of a screen shot selection. Is there any way to detect this?

I'm talking about the "capture some of your screen" feature described here: http://support.apple.com/kb/HT5775

도움이 되었습니까?

해결책

I believe I've found the answer: check whether /usr/sbin/screencapture is running.

I opened Activity Monitor, sorted by process ID, and hit cmd-shift-4. screencapture appeared at the top of the list for the duration of the screen capture.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top