How to set a double press key shortcut on Mavericks? i.e. double-press option-key for mission control
You can use a private.xml like this with KeyRemap4MacBook:

&lt;?xml version="1.0"?&gt;
&lt;root&gt;
  &lt;item&gt;
    &lt;name&gt;custom&lt;/name&gt;
    &lt;identifier&gt;custom&lt;/identifier&gt;
    &lt;autogen&gt;__DoublePressModifier__ KeyCode::OPTION_L, KeyCode::OPTION_L,
    KeyCode::EXPOSE_ALL&lt;/autogen&gt;
  &lt;/item&gt;
&lt;/root&gt;


You can also assign different functions to pressing and holding a key. This would make pressing the right command open Safari:

&lt;?xml version="1.0"?&gt;
&lt;root&gt;
  &lt;vkopenurldef&gt;
    &lt;name&gt;KeyCode::VK_OPEN_URL_SAFARI&lt;/name&gt;
    &lt;url&gt;file:///Applications/Safari.app&lt;/url&gt;
  &lt;/vkopenurldef&gt;
  &lt;item&gt;
    &lt;name&gt;custom&lt;/name&gt;
    &lt;identifier&gt;custom&lt;/identifier&gt;
    &lt;autogen&gt;__KeyOverlaidModifier__ KeyCode::COMMAND_R, KeyCode::COMMAND_R,
    KeyCode::VK_OPEN_URL_SAFARI&lt;/autogen&gt;
  &lt;/item&gt;
&lt;/root&gt;