Link to home
Start Free TrialLog in
Avatar of Mindo
Mindo

asked on

How to know if the ALT key is currently pressed?

I want to know if the ALT key is currently pressed.

To know if the CTRL is currently pressed i use:

if(GetKeyState(VK_CTRL) & 0x8000)
{
  ...
}

How to get the ALT key state? The Visual C++ doesn't recognise the VK_ALT constant.

Please, provide a short code as an answer. Thanks.
ASKER CERTIFIED SOLUTION
Avatar of SteveGTR
SteveGTR
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mindo
Mindo

ASKER

Ok, i accept it as an answer. Please, take a look at my next question.