SDL KeyEvents

I’m having trouble implementing a keypress handler. I’m using code
from the examples in the SDL doc. When I poll for events, I detect a
KeyDown Event. But regardless of what key I press, SDL says the key is
unknown. The keysym.scancode values change, but the keysym.sym says
SDL_UNKNOWN. Here is my code.

void ActionHandler()
{
SDL_Event e;

while(SDL_PollEvent(&e))
	{
	switch(e.type)
		{
		case SDL_KEYDOWN:
			KeyPressEvent(e.key.keysym.sym);
		break;
		
		}
	}/* end while*/
}

void KeyPressEvent(int keypress)
{
switch(keypress)
{

	case SDLK_SPACE:
		CycleIcons();
	break;
	
	case SDLK_RETURN:
		SelectIcon();
	break;
	
	case SDLK_q:
		gGameLoop = 0;
	break;
	
	}
	
	HideMessageBox();
}

I am running the latest SDL on Mac OS 10.2 compling with CodeWarrior 8.

Luke Bailey