Copy screenshots to the clipboard on macOS
On macOS, when capturing a screenshot using the combination <kbd>cmd</kbd> + <kbd>shift</kbd> + <kbd>4</kbd> keys, the screenshot is then saved to the desktop.
The desktop soon will contain a lot of temporary files, since the screenshots are mostly used once.
In order to copy the screenshot directly to the clipboard rather then creating new file, we can press <kbd>ctrl</kbd> + <kbd>cmd</kbd> + <kbd>shift</kbd> + <kbd>4</kbd> when creating a screenshot.
As soon as the screenshot is available in the clipboard, we can press <kbd>ctrl</kbd> + <kbd>v</kbd> to paste or upload it if the application suports.
It's very helpful when we need the screenshot to report an issue, on GitHub for example, as you see in the following video.
<video loop muted controls>
<source src="/img/copy-screenshot-to-clipboard.mp4" type="video/mp4">
</video>
See also