I've set one of my mouse's (Explorer Mini Mouse) buttons to "Show/Hide Desktop." However it seems to be misbehaving in some apps, i.e. when I use the button the Start menu appears, and I have to press it again for the shortcut to actually work. This seems to happend only in some apps, namely web browsers (tried Chrome, IE 9, Firefox and Opera). That doesn't happen if I use the shortcut (CTRL + D) though.
EDIT: Looks like I solved it by creating a Macros that keeps the Windows key pressed and then presses the "D" key for a second. Still wondering why it didn't work the "easy" way though.