diff -cr SDL-1.2.8/src/events/SDL_keyboard.c SDL-1.2.8-dwh/src/events/SDL_keyboard.c *** SDL-1.2.8/src/events/SDL_keyboard.c 2004-02-18 12:22:00.000000000 -0500 --- SDL-1.2.8-dwh/src/events/SDL_keyboard.c 2005-03-14 16:10:41.285827354 -0500 *************** *** 37,43 **** #include "SDL_timer.h" #include "SDL_events_c.h" #include "SDL_sysevents.h" ! /* Global keystate information */ static Uint8 SDL_KeyState[SDLK_LAST]; --- 37,43 ---- #include "SDL_timer.h" #include "SDL_events_c.h" #include "SDL_sysevents.h" ! #include "SDL_sysvideo.h" /* Global keystate information */ static Uint8 SDL_KeyState[SDLK_LAST]; *************** *** 391,396 **** --- 391,426 ---- 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 -cr SDL-1.2.8/src/video/SDL_video.c SDL-1.2.8-dwh/src/video/SDL_video.c *** SDL-1.2.8/src/video/SDL_video.c 2004-12-13 02:54:34.000000000 -0500 --- SDL-1.2.8-dwh/src/video/SDL_video.c 2005-03-14 16:11:00.949981893 -0500 *************** *** 1788,1794 **** * 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; --- 1788,1794 ---- * 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;