As a tech blogger, I take a lot of screenshots on my MacBook Pro. I use the Command-Shift-4 method frequently to take a screenshot of a selection of my desktop, but there is a better way if you want to take a screenshot of an open window.
I'm getting ahead of myself. Let's review the three keyboard shortcuts for taking screenshots on a Mac:
It captures a screenshot of your entire screen.
It turns the cursor into a crosshair, which you can drag to select a portion of your screen to capture. Release the mouse button or trackpad to take the shot.
3. Command-Shift-4, then space bar, then click on a window
Hitting the space bar turns the crosshair into a little camera icon, which you can move over any open window. Click on your desired window to take a screenshot of it. A screenshot captured by this method features a white border around the window with a bit of a drop shadow.