Windows 10 : How to switch from VGA to HDMI on the same PC

On a windows 10 computer, sometimes you have an HDMI port and a VGA port. Normally, you only have 1 monitor. When you try to plug both ports together, windows guesses you have 2 monitors so when you scroll to the right, the mouse disappears.

Now if you remove the VGA cable you will see a black screen. The secret is the Windows+P key. When you press this button, the system automatically switches to HDMI port. Please note that this step would take around 10 seconds to kick-in.

At first I thought it did not work. But patience is truly a virtue.

Coffee Cup