projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixing the situation in which the special-key-up callback is called twice when Ctrl...
[freeglut]
/
src
/
mswin
/
fg_main_mswin.c
diff --git
a/src/mswin/fg_main_mswin.c
b/src/mswin/fg_main_mswin.c
index
0f7f4ae
..
b766dd2
100644
(file)
--- 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 );
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,
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 );
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,
case VK_DELETE:
/* The delete key should be treated as an ASCII keypress: */
INVOKE_WCB( *window, KeyboardUp,