This works in Windows 8, and it might also work in Windows 7.
By doing this, you can make a single key do three things:
1. The first time you press it, from a Windows 8 (or "Metro") App, it switches to the Desktop mode with all windows still open.
2. If you then hit the key a second time, it minimizes all the windows.
3. Then if you hit it a third time, it restores the windows.
And if you're already in desktop mode, it will just perform functions 2 and 3.
First you have to have a copy of the "Show Desktop" icon in a folder. In my Windows 8, I found that it's already in the folder
C:\Users\Default\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch
In Windows 7, I understand it appears on the taskbar, so it must be in some folder.
Copy and paste it into
C:\Program Data\Microsoft\Windows\Start Menu\Programs\Windows Accessories\System Tools
Then, in that folder, right-click the icon and select Properties." Click in the "Shortcut Key" pane and press one of the 12 function keys, or one of the 4 operation keys + - * / on the numeric keypad, and click OK. That key should then work 3 ways, as I described above.
(Most of the other keys can also be used as shortcuts, but then you have to hold down "Ctrl + Alt" every time you use them. On the other hand, if you use a function key it won't work this way when you're in an app that assigns that key a different purpose.)