Skip to content

Commit

Permalink
Fixed bug #124
Browse files Browse the repository at this point in the history
Print Screen key events weren't reported on Windows
  • Loading branch information
slouken committed Mar 14, 2006
1 parent 46096b3 commit 1894b38
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/video/windib/SDL_dibevents.c
Expand Up @@ -160,7 +160,7 @@ LRESULT DIB_HandleMessage(_THIS, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
SDL_keysym keysym;

#ifdef _WIN32_WCE
// Drop GAPI artefacts
// Drop GAPI artifacts
if (wParam == 0x84 || wParam == 0x5B)
return 0;

Expand Down Expand Up @@ -197,6 +197,11 @@ LRESULT DIB_HandleMessage(_THIS, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
wParam = VK_LMENU;
break;
}
/* Windows only reports keyup for print screen */
if ( wParam == VK_SNAPSHOT && SDL_GetKeyState(NULL)[SDLK_PRINT] == SDL_RELEASED ) {
posted = SDL_PrivateKeyboard(SDL_PRESSED,
TranslateKey(wParam,HIWORD(lParam),&keysym,1));
}
posted = SDL_PrivateKeyboard(SDL_RELEASED,
TranslateKey(wParam,HIWORD(lParam),&keysym,0));
}
Expand Down
2 changes: 1 addition & 1 deletion src/video/windx5/SDL_dx5events.c
Expand Up @@ -802,7 +802,7 @@ void DX5_InitOSKeymap(_THIS)
DIK_keymap[DIK_NUMPADENTER] = SDLK_KP_ENTER;
DIK_keymap[DIK_RCONTROL] = SDLK_RCTRL;
DIK_keymap[DIK_DIVIDE] = SDLK_KP_DIVIDE;
DIK_keymap[DIK_SYSRQ] = SDLK_SYSREQ;
DIK_keymap[DIK_SYSRQ] = SDLK_PRINT;
DIK_keymap[DIK_RMENU] = SDLK_RALT;
DIK_keymap[DIK_PAUSE] = SDLK_PAUSE;
DIK_keymap[DIK_HOME] = SDLK_HOME;
Expand Down

0 comments on commit 1894b38

Please sign in to comment.