Keyboard input issue on OSX

I’m trying to port a working linux SDL application to OSX. Currently,
keyboard input works fine in linux in our GUI and NOGUI modes (commandline
option or compile time restriction). On OSX, while GUI mode works, NOGUI
does not.

We have either a Gtk or Qt4 GUIs (compile time option), each running in
their own thread in GUI mode. In NOGUI mode the whole app is single
threaded.

The very strange thing is Joydev / mouse input DOES work in GUI and NOGUI
mode.

This may or may not be related:
Using SDL_Threads on OSX also gives a lot of these types of errors:

Stack: (0x94282adf 0x9418f1f2 0x904ae64f 0x90513652 0x905364b4 0x9049c1d1
0x9049c12a 0x1bd9225 0x1bcd968 0x2f86a97)
2008-10-12 15:34:41.022 mupen64plus[36762:560b] ***
_NSAutoreleaseNoPool(): Object 0x113f9540 of class NSCFString autoreleased
with no pool in place - just leaking

Any ideas?