View Full Version : how do I check if the shift key is depressed?

09-27-2003, 12:00 PM
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, 12:25 PM
You can use the win32 function

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

09-27-2003, 01:53 PM
great, thanks

09-28-2003, 07:15 AM
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