This has also been implemented for the SDL2 and macOS backends.
This is consistent with the OS shortcut (Crtl+Shift+3) to take a screenshot.
There was already an implementation using SDL2 in the SDL backend, but this way we have it available also when using the SDL 1.