Keyboard State - is ANY key pressed?
-
Is there a WIN32 function that will tell me whether any modifier key is pressed? The context is a mouse hook function that is only interested if one or more modifier keys (shift, ctrl, alt) is pressed. If no key is pressed it just passes the event to the next hook. I know that GetKeyState() returns the state of a specified virtual key, and that GetKeyboardState() returns an array of states. But a function that just tells me if ANY modifier key is pressed would add less latency in cases (most of the time) when a key is not pressed. Thanks for listening :-)
-
Is there a WIN32 function that will tell me whether any modifier key is pressed? The context is a mouse hook function that is only interested if one or more modifier keys (shift, ctrl, alt) is pressed. If no key is pressed it just passes the event to the next hook. I know that GetKeyState() returns the state of a specified virtual key, and that GetKeyboardState() returns an array of states. But a function that just tells me if ANY modifier key is pressed would add less latency in cases (most of the time) when a key is not pressed. Thanks for listening :-)
What's wrong with
GetAsyncKeyState()
?"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
-
What's wrong with
GetAsyncKeyState()
?"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch