Capture contents of a window

Everyone knows you can take a screenshot by pressing Cmd+Shift+3 (full screen) or Cmd+Shift+4 (selected area). I've found that in Preview you select in File/Grab menu also to save only the contents of a single window (and you can take a timed screenshot as well, but that's another story). Actually I think that we use this option most of the time. But how can you do this via a simple keyboard shortcut? It's easy: after entering the area-selection mode via the Cmd+Shift+4 combination, press the space key to switch to window grabbing mode!