Screenshots on the Mac: An Exhuastive Guide That Probably Didn’t Need to Be Written

If you do any amount of work on the web you likely need to share screenshots now and then. Or, more likely, you need to do it five times a day. Apple’s official documentation on screenshots is a bit dry, although relatively complete. There are also a billion and one tutorials about various aspects of this around the internet. They’re all mostly good too. I’m writing mine mostly so that I have my own I can reference and add to over the years. osdata.com’s is probably the most complete guide to screenshots on the mac I managed to find, although is outdated now.

If you know of something I missed, drop me a line about it.

The Basics

The foundation of a screenshot is the command+shift key combination. On top of that there are two basic actions: “Entire Screen” mode and “Selected Portion” mode. On top of those we can add additional modifiers for other results.

To screenshot the whole screen (or actually all of your screens as separate images if you have multiple desktops):

cmd+shift+3

To grab a selected portion of the screen:

cmd+shift+4

You then click and drag to make your selection. Release and it’ll take the screenshot.

Both methods will save the screenshot to your default screenshots folder. At the bottom of this page will be a way to change this location to something more sensible, like ~/Desktop/screenshots.

Modifiers

Most modifiers are only for cmd+shift+4’s selection mode. cmd+shift+3 grabs the whole screen and that’s it. The only modifier it works with is control and it must be pressed alongside the other keys (cmd+shift+cntl+4), which is awkward to say the least. (Unless you’re an emacs user and then it’s like a nice hand warmup.)

Control

Add in cntl to the chord and it will copy directly to your clipboard instead of saving it to your screenshots folder. This is useful if the lifespan of the screenshot is to share it for a one-off use. Slack, the program I’m in most of the day every day, plays nicely with pasted images. So do most email programs.

Space (before dragging your selection)

If you hit space before you start drawing, it will allow you to instead select the active window (or menu dropdown if it’s already open) and take a screenshot of that with a nice drop shadow around it. This looks extraordinarily professional while saving you time in photoshop. Thanks to @jboonstra for the tip that this exists!

Space (after dragging your selection)

After you have begun drawing your window you can reposition it by holding down the spacebar. This will save you so much hassle over the years. I usually get the cursor close to where I want. draw the box, and then reposition. Once the combinations are in your fingers its easy to fly with this.

An important thing to know about your computer is that this trick also works in other applications where you have a selection (notably photoshop). You’ll feel like a wizard the first few times you do this.

Option

Will scale the box from the center out proportionally. While neat, I have yet to have a great reason to use it.

Shift (after you’ve begun drawing)

Hold shift again to constrain the box’s height or width. start moving vertically and it won’t let the box go wider or narrower and vice versa. Very useful for locking in an exact width/height. You can chain this with option to scale those dimensions proportionally as well.

Escape

If you’re so lucky as to still have an ESC key (ha! Courage!) you can hit it to exit out of selection mode and walk away without taking a screenshot.

Basic setup for extra happiness

Change the default location for where your screenshots get saved. Out of the box your mac has that set to the desktop. This is a recipe for having a very cluttered desktop. If you make a folder then whenever you ask “where did that screenshot go?” It’s in that folder.

If the lines below don’t make sense to you this tutorial spells them out in more detail:

mkdir ~/Desktop/screenshots
defaults write com.apple.screencapture location ~/Desktop/screenshots
killall SystemUIServer

Replace ~/Desktop/screenshots with whatever folder makes most sense to you.

Change the Naming Scheme

If you want to modify the way the names are you can do this:

defaults write com.apple.screencapture name -string "a very good screenshot prefix"

If you’re working on a particular project and want to keep all your screenshots tidy you could change the prefix while you’re working on the project and then change it back. Or, do what I do and personalize it a bit because of vanity.

What about that date and time stuff?

The date and time at the end of the naming syntax is harder to get at. You could, if you were brave, try to modify the appropriate strings in this file to whatever you wanted it to be:

/System/Library/CoreServices/SystemUIServer.app/Contents/Resources/English.lproj/ScreenCapture.strings

This is, however, locked down by System Integrity Protection. You could turn it off, change the appropriate string in there, and then turn it back on. If you’re about to turn off SIP that’s usually a good sign to investigate writing a script instead. This was buried in an answer on an apple discussion board

Change the default filetype

.png is a very good file format for images, but there are reasons you might want to change this to something else. This will set your preferences:

defaults write com.apple.screencapture type [format]

And your options are:

bmp
pdf
jpg
jp2
tif
pict
tga
png

For example, if you needed a screenshot as a pdf:

defaults write com.apple.screencapture type pdf

And turn it back to png

defaults write com.apple.screencapture type png

Drop-shadows are bad?

The following will disable the drop-shadow when you use cmd+shift+4 and then hold down space to select a window:

defaults write com.apple.screencapture disable-shadow -bool true

To put it back on:

defaults write com.apple.screencapture disable-shadow -bool false

tekrevue.com is where I found this

Mute That Shutter Sound

I looked and looked for a clean way to do this. There’s no way to specifically mute the skeuomorphic “cha-chunk” for screenshots. There are a few ways around it if it’s onerous to you though.

This mutes all system audio effects

defaults write com.apple.systemsound "com.apple.sound.uiaudio.enabled" -int 0

Turn it back on:

defaults write com.apple.systemsound "com.apple.sound.uiaudio.enabled" -int 1

Alternatively, there’s a setting in Preferences->Sound called “Play User Interface Sound Effects”. Tick that off to do the same thing.

Or, you could replace the file that gets played with a blank audio file instead. It’s this one:

/System/Library/Components/CoreAudio.component/Contents/SharedSupport/SystemSounds/system/Grab.aif

Again, this is locked down by SIP, so ymmv.

The Command Line is an Option Too, Nerd

You can also use the CLI version of screencapture to script tasks you don’t want to do manually. screencapture is available on the command line with additional options. Read the man page or go here to dive in.

The two flags that were most obviously useful on a scan of its options were the following:

-T will do a screencapture after a particular timeframe. 10 is the default, you can set it to whatever:

screencapture -T 10

-M will take a screenshot and add it to a new email

screencapture -M mailme.jpg

Oh, also, -x will mute it.

Timed Screenshot using Preview

If you don’t want to use the command line to delay a screenshot you can open up Preview, then File->Screenshot and then “Timed Screenshot”. It’ll show a nice pie-chart countdown while you get your desktop ready for the screenshot.

BONUS TIP

If you’re a designer or a front-end developer you often need to check the sizes and placement of objects. Assuming you don’t have a grid or rulers in the program you’re using you can use the selection mode screenshot to do rudimentary aligning and checking. Activate it, draw a box, and then reposition with space to check edges. You’ll also have noted by now that there’s pixel dimensions alongside the crosshairs. Those are dead useful for checking pixels.