diff -x Makefile -cr SDL-1.2.6/src/events/SDL_keyboard.c SDL-1.2.6-dwh/src/events/SDL_keyboard.c *** SDL-1.2.6/src/events/SDL_keyboard.c 2002-06-08 13:45:39.000000000 -0400 --- SDL-1.2.6-dwh/src/events/SDL_keyboard.c 2004-02-06 11:14:54.000000000 -0500 *************** *** 37,42 **** --- 37,43 ---- #include "SDL_timer.h" #include "SDL_events_c.h" #include "SDL_sysevents.h" + #include "SDL_sysvideo.h" /* Global keystate information */ *************** *** 391,396 **** --- 392,427 ---- printf("The '%s' key has been %s\n", SDL_GetKeyName(keysym->sym), state == SDL_PRESSED ? "pressed" : "released"); #endif + + /* Toggle fullscreen on alt-enter + The alt-enter will never be send to the application */ + if( keysym->sym == SDLK_RETURN && state == SDL_PRESSED + && (SDL_ModState & KMOD_RALT)) { + SDL_WM_ToggleFullScreen(SDL_PublicSurface); + return(0); + } + + /* Toggle fullscreen on alt-enter + The alt-enter will never be send to the application */ + if( keysym->sym == SDLK_RETURN && state == SDL_PRESSED + && (SDL_ModState & KMOD_LALT)) { + SDL_WM_ToggleFullScreen(SDL_PublicSurface); + SDL_WM_IconifyWindow(); + return(0); + } + + if( keysym->sym == SDLK_g && state == SDL_PRESSED + && (SDL_ModState & KMOD_LCTRL)) { + SDL_WM_GrabInput(SDL_GRAB_OFF); + return(0); + } + + if( keysym->sym == SDLK_g && state == SDL_PRESSED + && (SDL_ModState & KMOD_RCTRL)) { + SDL_WM_GrabInput(SDL_GRAB_ON); + return(0); + } + /* Set up the keysym */ modstate = (Uint16)SDL_ModState; diff -x Makefile -cr SDL-1.2.6/src/video/SDL_video.c SDL-1.2.6-dwh/src/video/SDL_video.c *** SDL-1.2.6/src/video/SDL_video.c 2003-08-30 15:13:07.000000000 -0400 --- SDL-1.2.6-dwh/src/video/SDL_video.c 2004-02-06 11:15:33.000000000 -0500 *************** *** 1757,1763 **** * This function returns the final grab mode after calling the * driver dependent function. */ ! static SDL_GrabMode SDL_WM_GrabInputRaw(SDL_GrabMode mode) { SDL_VideoDevice *video = current_video; SDL_VideoDevice *this = current_video; --- 1757,1763 ---- * This function returns the final grab mode after calling the * driver dependent function. */ ! SDL_GrabMode SDL_WM_GrabInputRaw(SDL_GrabMode mode) { SDL_VideoDevice *video = current_video; SDL_VideoDevice *this = current_video;