The default value for VK_CONTROL / VK_MENU / VK_SHIFT

We have two CTRL / ALT / SHIFT buttons on our keyboard. But in win api there is VK_CONTROL / VK_LCONTROL / VK_RCONTROL . So what is the default value for VK_CONTROL? VK_LCONTROL (left) or VK_RCONTROL (right)? Or maybe it changes value depending on the situation? Cannot find the answer in either MSDN or Google.

I think this does not matter in relation to CTRL - they alternate, but it does matter, for example. ALT .

+7
source share
2 answers

Text from WinUser.h:

VK_L* & VK_R* - left and right Alt, Ctrl and Shift virtual keys.
Used only as parameters to GetAsyncKeyState() and GetKeyState().
No other API or message will distinguish left and right keys in this way.

+7
source

As far as I can tell, these constants are declared in WinUser.h

 #define VK_LSHIFT 0xA0 #define VK_RSHIFT 0xA1 #define VK_LCONTROL 0xA2 #define VK_RCONTROL 0xA3 #define VK_LMENU 0xA4 #define VK_RMENU 0xA5 
+2
source

All Articles