Back on the original Macintosh, which was a single-tasking system, there were special keyboard shortcuts that bypassed the current application and invoked system functions. Command-Shift-1 ejected a floppy from drive 1, …2 from drive 2, and …3 being the next available slot became the screenshot operation.