|
From: <jt...@us...> - 2022-03-08 01:11:52
|
Revision: 1877
http://sourceforge.net/p/freeglut/code/1877
Author: jtsiomb
Date: 2022-03-08 01:11:49 +0000 (Tue, 08 Mar 2022)
Log Message:
-----------
implemented SUPER key/modifier support on windows
Modified Paths:
--------------
trunk/freeglut/freeglut/src/mswin/fg_main_mswin.c
Modified: trunk/freeglut/freeglut/src/mswin/fg_main_mswin.c
===================================================================
--- trunk/freeglut/freeglut/src/mswin/fg_main_mswin.c 2022-03-08 01:11:38 UTC (rev 1876)
+++ trunk/freeglut/freeglut/src/mswin/fg_main_mswin.c 2022-03-08 01:11:49 UTC (rev 1877)
@@ -575,7 +575,9 @@
( ( ( GetKeyState( VK_LCONTROL ) < 0 ) ||
( GetKeyState( VK_RCONTROL ) < 0 )) ? GLUT_ACTIVE_CTRL : 0 ) |
( ( ( GetKeyState( VK_LMENU ) < 0 ) ||
- ( GetKeyState( VK_RMENU ) < 0 )) ? GLUT_ACTIVE_ALT : 0 );
+ ( GetKeyState( VK_RMENU ) < 0 )) ? GLUT_ACTIVE_ALT : 0 ) |
+ ( ( ( GetKeyState( VK_LWIN ) < 0 ) ||
+ ( GetKeyState( VK_RWIN ) < 0 )) ? GLUT_ACTIVE_SUPER : 0 );
}
/* Check whether a button (VK_*BUTTON) is currently depressed. Returns
@@ -631,6 +633,8 @@
FG_KEY( VK_RIGHT, GLUT_KEY_RIGHT );
FG_KEY( VK_DOWN, GLUT_KEY_DOWN );
FG_KEY( VK_INSERT, GLUT_KEY_INSERT );
+ FG_KEY( VK_LWIN, GLUT_KEY_SUPER_L );
+ FG_KEY( VK_RWIN, GLUT_KEY_SUPER_R );
/* handle control, alt and shift. For GLUT, we want to distinguish between left and right presses.
* The VK_L* & VK_R* left and right Alt, Ctrl and Shift virtual keys are however only used as parameters to GetAsyncKeyState() and GetKeyState()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|