I am looking for way for my app to receive a notification when the user takes a screenshot either with Command-Shift-3
or Command-Shift-4
.
An e
This was mentioned in one of the earlier comments, but you can use an NSMetadataQuery
searching for files where kMDItemIsScreenCapture = 1
. This is a special attribute that gets added to screenshot files.
I just whipped up a little demo showing how to do this and posted it on github:
https://github.com/davedelong/Demos/blob/master/ScreenShot%20Detector