If you use an external display with your Mac laptop, you can use Command-F1 in macOS Mojave to turn display mirroring on and off. Display mirroring is when your external monitor and laptop display show the same screen.

If you need to temporarily see your Dock or your open windows on both displays, Command-F1 lets you accomplish this. It’s a shortcut to the System Preferences > Displays > Arrangement > Mirror Displays command.
(This how-to is based on my experiences and info on Apple’s support pages — where the images sometimes come from.)