event.key.keysym.mod & KMOD_ALT,
(event.key.keysym.mod & KMOD_ALT) || altkeys,
static void Handle_event	(	SDL_Event& event	)	{					// For detecting double-clicks.	static unsigned long last_b1_click = 0;//cout << "Event " << (int) event.type << " received"<<endl;	switch (event.type)		{	case SDL_MOUSEBUTTONDOWN:		if (gwin->get_mode() != Game_window::normal &&		    gwin->get_mode() != Game_window::gump)			break;		if (event.button.button == 1)			{			dragging = gwin->start_dragging(event.button.x,							event.button.y);			dragged = 0;			}					// Move sprite toward mouse					//  when right button pressed.		if (event.button.button == 3 && 		    gwin->get_mode() == Game_window::normal)			gwin->start_actor(event.button.x, event.button.y, 								avatar_speed);		break;	case SDL_MOUSEBUTTONUP:		if (event.button.button == 3)			{			if (gwin->get_mode() != Game_window::normal)				break;			gwin->stop_actor();			}		else if (event.button.button == 1)			{			unsigned long curtime = SDL_GetTicks();			if (dragging)				gwin->drop_dragged(event.button.x, 						event.button.y, dragged);					// Last click within .5 secs?			if (curtime - last_b1_click < 500)				{				dragging = 0;				gwin->double_clicked(event.button.x, 							event.button.y);				if (gwin->get_mode() == Game_window::gump)					mouse->set_shape(Mouse::hand);				break;				}			last_b1_click = curtime;			if (!dragged)					// Identify item(s) clicked on.				gwin->show_items(event.button.x, 							event.button.y);			dragging = 0;			}		break;	case SDL_MOUSEMOTION:		{#ifdef MOUSE		mouse->move(event.motion.x, event.motion.y);		if (gwin->get_mode() == Game_window::normal)			{			int ax, ay;	// Get Avatar screen location.			gwin->get_shape_location(gwin->get_main_actor(), 								ax, ay);			int dy = ay - event.motion.y, dx = event.motion.x - ax;			Direction dir = Get_direction(dy, dx);			int dist = dy*dy + dx*dx;			if (dist < 48*48)				{				mouse->set_short_arrow(dir);				avatar_speed = slow_speed;				}			else if (dist < 180*180)				{				mouse->set_medium_arrow(dir);				avatar_speed = medium_speed;				}			else				{				mouse->set_long_arrow(dir);				avatar_speed = fast_speed;				}			}		gwin->set_painted();	// We'll need to blit.#endif		if (gwin->get_mode() != Game_window::normal &&		    gwin->get_mode() != Game_window::gump)			break;					// Dragging with left button?		if (event.motion.state & SDL_BUTTON(1))			{			gwin->drag(event.motion.x, event.motion.y);			dragged = 1;			}					// Dragging with right?		if (event.motion.state & SDL_BUTTON(3))			gwin->start_actor(event.motion.x, event.motion.y,								avatar_speed);		break;		}	case SDL_ACTIVEEVENT:#ifdef MOUSE		if (event.active.state & SDL_APPMOUSEFOCUS)			{			if (event.active.gain)				{				int x, y;				SDL_GetMouseState(&x, &y);				mouse->set_location(x, y);				}			}#endif		if (event.active.state & SDL_APPINPUTFOCUS)			{			if (event.active.gain)				gwin->get_focus();			else				gwin->lose_focus();			}		if (event.active.state & SDL_APPACTIVE)					// Became active.			if (event.active.gain)				gwin->init_actors();		break;#if 0	case ConfigureNotify:		// Resize.		gwin->resized(event.xconfigure.window,			event.xconfigure.width, event.xconfigure.height);		break;#endif	case SDL_QUIT:		quitting_time = 1;		break;	case SDL_KEYDOWN:			// Keystroke.		Handle_keystroke(event.key.keysym.sym,			event.key.keysym.mod & KMOD_SHIFT,			event.key.keysym.mod & KMOD_ALT,			event.key.keysym.mod & KMOD_CTRL);		break;#ifdef WIN32	case SDL_SYSWMEVENT://		printf("SYSWMEVENT received, %x\n", event.syswm.msg->msg);		if (event.syswm.msg->msg == MM_MCINOTIFY) {#if DEBUG			cerr << "MM_MCINOTIFY message received"<<endl;#endif			((Windows_MCI*)(audio->get_midi()))->callback(event.syswm.msg->wParam, 							event.syswm.msg->hwnd);		}		break;#endif		}	}