Remapping keys in KeyRemap4MacBook, how do I find keycodes?
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.