From: John F. Fay Date: Sun, 10 Jun 2012 19:35:13 +0000 (+0000) Subject: Fixing the situation in which the special-key-up callback is called twice when Ctrl... X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=commitdiff_plain;h=8a68c786f456d44e8bf46e0d78c2b7fada1c4d5e;p=freeglut Fixing the situation in which the special-key-up callback is called twice when Ctrl, Alt, or Shift is released. git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1340 7f0cb862-5218-0410-a997-914c9d46530a --- diff --git a/src/mswin/fg_main_mswin.c b/src/mswin/fg_main_mswin.c index 0f7f4ae..b766dd2 100644 --- a/src/mswin/fg_main_mswin.c +++ b/src/mswin/fg_main_mswin.c @@ -794,6 +794,12 @@ LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, KEY( VK_DOWN, GLUT_KEY_DOWN ); KEY( VK_INSERT, GLUT_KEY_INSERT ); + case VK_LCONTROL: case VK_RCONTROL: case VK_CONTROL: + case VK_LSHIFT: case VK_RSHIFT: case VK_SHIFT: + case VK_LMENU: case VK_RMENU: case VK_MENU: + /* These keypresses and releases are handled earlier in the function */ + break; + case VK_DELETE: /* The delete key should be treated as an ASCII keypress: */ INVOKE_WCB( *window, Keyboard, @@ -880,6 +886,12 @@ LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, KEY( VK_DOWN, GLUT_KEY_DOWN ); KEY( VK_INSERT, GLUT_KEY_INSERT ); + case VK_LCONTROL: case VK_RCONTROL: case VK_CONTROL: + case VK_LSHIFT: case VK_RSHIFT: case VK_SHIFT: + case VK_LMENU: case VK_RMENU: case VK_MENU: + /* These keypresses and releases are handled earlier in the function */ + break; + case VK_DELETE: /* The delete key should be treated as an ASCII keypress: */ INVOKE_WCB( *window, KeyboardUp,