Quake 3 source released - XCode project included
Big suprise for me was keyboard handling. Instead of overriding NSApplication they use a normal NSApplication but intercept the events in a custom loop after applicationDidFinishLaunching. Plus for some reason they are using the lower level system events to track the mouse buttons (maybe because you can detect more than 3 buttons on your mouse?). That's all I've looked at so far.

