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.
VK_CONTROL
VK_LCONTROL
VK_RCONTROL
VK_CONTROL?
I think this does not matter in relation to CTRL - they alternate, but it does matter, for example. ALT .
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.
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.
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