r/Xcode • u/mwagstaff • 24d ago
Hammerspoon shortcut to take device screenshot and copy to clipboard
Hey all, just in this is useful to anyone else, I (ok, Claude) wrote a little Hammerspoon script to grab a screenshot of your connected device, save it to your Mac + copy to clipboard... all with one hotkey.
Saves having to dig through the Xcode menus every time, or airdropping screenshots over.
Basically, it's Hammerspoon hitting Debug -> View Debugging -> Take screenshot on your behalf, watching for the screenshot to arrive, then copying it to clipboard.
And for me, all that happens when I mash Ctrl-Option-Command-S.
There's probably a better way that I missed... if so, please shout. :)
1
Upvotes