summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
3b8c74a)
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1506
7f0cb862-5218-0410-a997-
914c9d46530a
( GetKeyState( VK_RMENU ) < 0 )) ? GLUT_ACTIVE_ALT : 0 );
}
( GetKeyState( VK_RMENU ) < 0 )) ? GLUT_ACTIVE_ALT : 0 );
}
-static void fghKeyPress(SFG_Window *window, GLboolean keydown, WPARAM wParam, LPARAM lParam)
+static LRESULT fghKeyPress(SFG_Window *window, UINT uMsg, GLboolean keydown, WPARAM wParam, LPARAM lParam)
{
static unsigned char lControl = 0, lShift = 0, lAlt = 0,
rControl = 0, rShift = 0, rAlt = 0;
{
static unsigned char lControl = 0, lShift = 0, lAlt = 0,
rControl = 0, rShift = 0, rAlt = 0;
/* if keydown, check for repeat */
if( keydown && ( fgState.KeyRepeat==GLUT_KEY_REPEAT_OFF || window->State.IgnoreKeyRepeat==GL_TRUE ) && (HIWORD(lParam) & KF_REPEAT) )
/* if keydown, check for repeat */
if( keydown && ( fgState.KeyRepeat==GLUT_KEY_REPEAT_OFF || window->State.IgnoreKeyRepeat==GL_TRUE ) && (HIWORD(lParam) & KF_REPEAT) )
/* Remember the current modifiers state so user can query it from their callback */
fgState.Modifiers = fgPlatformGetModifiers( );
/* Remember the current modifiers state so user can query it from their callback */
fgState.Modifiers = fgPlatformGetModifiers( );
);
fgState.Modifiers = INVALID_MODIFIERS;
);
fgState.Modifiers = INVALID_MODIFIERS;
+
+ /* SYSKEY events should be sent to default window proc for system to handle them */
+ if (uMsg==WM_SYSKEYDOWN || uMsg==WM_SYSKEYUP)
+ return DefWindowProc( window->Window.Handle, uMsg, wParam, lParam );
+ else
+ return 1;
case WM_KEYDOWN:
if (child_window)
window = child_window;
case WM_KEYDOWN:
if (child_window)
window = child_window;
- fghKeyPress(window,GL_TRUE,wParam,lParam);
+ lRet = fghKeyPress(window,uMsg,GL_TRUE,wParam,lParam);
break;
case WM_SYSKEYUP:
case WM_KEYUP:
if (child_window)
window = child_window;
break;
case WM_SYSKEYUP:
case WM_KEYUP:
if (child_window)
window = child_window;
- fghKeyPress(window,GL_FALSE,wParam,lParam);
+ lRet = fghKeyPress(window,uMsg,GL_FALSE,wParam,lParam);