Turning mirroring on and off from the keyboard can be useful if your built-in laptop screen has failed, and you want to have the main screen sent to an attached, external screen, to login, etc.
Press and hold the command key, and press the brightness-down key.
Note, if you have set the top row of keys to default to F1 to F12 instead, also hold down the fn key (this is not the default).