X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fmswin%2Ffg_main_mswin.c;h=e9d455df7402ba2836c1d1b7222b7d270b875922;hb=dcea2892e0674b837d45b61d842c017ec115467f;hp=6d286e75142f2225d7e5c0178647791f0f5cdd56;hpb=05b6bbde0da001c28010a9677cf676f1ad5419de;p=freeglut diff --git a/src/mswin/fg_main_mswin.c b/src/mswin/fg_main_mswin.c index 6d286e7..e9d455d 100644 --- a/src/mswin/fg_main_mswin.c +++ b/src/mswin/fg_main_mswin.c @@ -575,7 +575,9 @@ static int fgPlatformGetModifiers (void) ( ( ( 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 @@ static LRESULT fghWindowProcKeyPress(SFG_Window *window, UINT uMsg, GLboolean ke 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()