Resolved Bind F5 to "Show Desktop"

Discussion in 'macOS' started by C64, Feb 15, 2011.

  1. C64 macrumors 65816


    Sep 3, 2008
    When I was typing this question I already found the answer, so I thought I might as well post it here in case someone else finds this useful.

    On my old MacBook there was the F11 key that I could use to show my desktop (the same thing as the "Desktop" hot corner setting). On the newer MacBooks though, this key is gone, and the only dedicated keys I can find are for Exposé and Dashboard.

    The F5 key on my MacBook Air doesn't seem to do anything though, and there isn't an icon on it. So I wanted to remap this key to show my desktop. I often find it easier to hit a key than to mouse to a corner. I installed KeyRemap4MacBook but I can't find an option to add the "Show Desktop" function. There is an option to add custom key bindings though, so I started looking for some key combination that could simulate this.

    And guess what: Cmd + F3. Doing :p After all those years, I still find out something new.

    Anyways, since I was already half way there, I wanted to bind it to F5. One key is still less than two. And here's how:

    1. Open up the KeyRemap4MacBook custom bind-config-file, as explained here.

    2. Then add the following:

    <?xml version="1.0"?>
    			<name>F5 to Show Desktop</name>
    			<autogen>--KeyToKey-- KeyCode::F5, KeyCode::EXPOSE_ALL, ModifierFlag::COMMAND_L</autogen>
    Then reload the XML in the KeyRemap4MacBook Change Key tab, check the checkbox for your new setting, and F5 now shows your desktop :cool: .
  2. smirk macrumors 6502a


    Jul 18, 2002
    Orange County, CA
    Could you not have also brought up the Keyboard system preference, clicked the Keyboard Shortcuts button, selected Expose & Spaces on the left, and then defined your F5 key as the trigger for "Desktop"?
  3. ritmomundo macrumors 68000


    Jan 12, 2011
    Los Angeles, CA
    Works perfectly in Lion as well. Thanks. I wanted to use the "blank" F5 key to "show desktop," (because I dont like the 3-finger+thumb gesture) so I just reassigned it under keyboard settings. Only difference is, that in Lion, its under Mission Control rather than Expose & Spaces.

Share This Page