comparison src/video/windib/SDL_dibevents.c @ 1526:89f90f32f6c0

Fixed bug #124 Print Screen key events weren't reported on Windows
author Sam Lantinga <slouken@libsdl.org>
date Tue, 14 Mar 2006 07:06:06 +0000
parents 21b1fbb53f4a
children 782fd950bd46 eb2d5480ae95
comparison
equal deleted inserted replaced
1525:23a347cfbed8 1526:89f90f32f6c0
158 case WM_SYSKEYUP: 158 case WM_SYSKEYUP:
159 case WM_KEYUP: { 159 case WM_KEYUP: {
160 SDL_keysym keysym; 160 SDL_keysym keysym;
161 161
162 #ifdef _WIN32_WCE 162 #ifdef _WIN32_WCE
163 // Drop GAPI artefacts 163 // Drop GAPI artifacts
164 if (wParam == 0x84 || wParam == 0x5B) 164 if (wParam == 0x84 || wParam == 0x5B)
165 return 0; 165 return 0;
166 166
167 // Rotate key if necessary 167 // Rotate key if necessary
168 if (this->hidden->orientation != SDL_ORIENTATION_UP) 168 if (this->hidden->orientation != SDL_ORIENTATION_UP)
194 if ( lParam&EXTENDED_KEYMASK ) 194 if ( lParam&EXTENDED_KEYMASK )
195 wParam = VK_RMENU; 195 wParam = VK_RMENU;
196 else 196 else
197 wParam = VK_LMENU; 197 wParam = VK_LMENU;
198 break; 198 break;
199 }
200 /* Windows only reports keyup for print screen */
201 if ( wParam == VK_SNAPSHOT && SDL_GetKeyState(NULL)[SDLK_PRINT] == SDL_RELEASED ) {
202 posted = SDL_PrivateKeyboard(SDL_PRESSED,
203 TranslateKey(wParam,HIWORD(lParam),&keysym,1));
199 } 204 }
200 posted = SDL_PrivateKeyboard(SDL_RELEASED, 205 posted = SDL_PrivateKeyboard(SDL_RELEASED,
201 TranslateKey(wParam,HIWORD(lParam),&keysym,0)); 206 TranslateKey(wParam,HIWORD(lParam),&keysym,0));
202 } 207 }
203 return(0); 208 return(0);