case SDL_KEYUP: switch (event.key.keysym.sym) { case SDLK_RALT: case SDLK_RMETA: altkeys &= ~1; break; case SDLK_LALT: case SDLK_LMETA: altkeys &= ~2; break; } break;
static int Handle_gump_event	(	Modal_gump_object *gump,	SDL_Event& event	)	{	switch (event.type)		{	case SDL_MOUSEBUTTONDOWN:cout << "(x,y) rel. to gump is (" << (event.button.x - gump->get_x()) << 	", " <<	(event.button.y - gump->get_y()) << ")"<<endl;		if (event.button.button == 1)			gump->mouse_down(event.button.x, event.button.y);		break;	case SDL_MOUSEBUTTONUP:		if (event.button.button == 1)			gump->mouse_up(event.button.x, 	event.button.y);		break;	case SDL_MOUSEMOTION:#ifdef MOUSE		mouse->move(event.motion.x, event.motion.y);		gwin->set_painted();#endif					// Dragging with left button?		if (event.motion.state & SDL_BUTTON(1))			gump->mouse_drag(event.motion.x, event.motion.y);		break;	case SDL_QUIT:		quitting_time = 1;		return (0);	case SDL_KEYDOWN:		{		if (event.key.keysym.sym == SDLK_ESCAPE)			return (0);		int chr = event.key.keysym.sym;		gump->key_down((event.key.keysym.mod & KMOD_SHIFT)					? toupper(chr) : chr);		break;		}		}	return (1);	}