Remapping keys in KeyRemap4MacBook, how do I find keycodes? I'm currently remapping some of the keys on my MacBook using KeyRemap4Macbook - in that process I need to remap the keys using this xml-file, namely private.xml, that is referenced here:http://pqrs.org/macosx/keyremap4macbook/xml.html.en

This is an example of how private.xml looks like:

&lt;?xml version="1.0"?&gt;
&lt;root&gt;
  &lt;item&gt;
    &lt;name&gt;Swap Space and Tab&lt;/name&gt;
    &lt;identifier&gt;private.swap_space_and_tab&lt;/identifier&gt;
    &lt;autogen&gt;--KeyToKey-- KeyCode::SPACE, KeyCode::TAB&lt;/autogen&gt;
    &lt;autogen&gt;--KeyToKey-- KeyCode::TAB, KeyCode::SPACE&lt;/autogen&gt;
  &lt;/item&gt;
&lt;/root&gt;


Does anyone know where I find a chart of the keycodes referenced in the XML, the capitalized words (SPACE, TAB)?
Based on this answer, key codes which you are looking for are:

kVK_Tab                       = 0x30,
  kVK_Space                     = 0x31,

See lines 269, 270.

Also there is an application which can show you key codes in a more friendly way.