View Full Version : how do I check if the shift key is depressed?
How can I check if the shift key is depressed? It isn't registered by glutKeyboardFunc or glutSpecialFunc, and shift-arrow key is the same code as just arrow key.
Nick Nougat
09-27-2003, 11:25 AM
You can use the win32 function
GetKeyState()
with parameter VK_LSHIFT VK_RSHIFT or just VK_SHIFT for any of both shift keys
it's defined as:
SHORT GetKeyState(
int nVirtKey // virtual-key code
);
You know what "depressed" really means, donīt you?
I think itīs really nice of you, that you care for the feelings of your keyboard http://www.opengl.org/discussion_boards/ubb/wink.gif http://www.opengl.org/discussion_boards/ubb/biggrin.gif
Jan.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.