How can I set caps lock to a more complex keystroke?
PCKeyboardHack
allows to change the caps lock key behavior. It's mac software, even tough the name may not suggest it :).

(pic from developer's website)