Add L/R virtual keys handling

This commit is contained in:
Zoran Vuckovic 2017-06-06 13:50:41 +02:00
parent 1d65222051
commit d88b76c26f

View File

@ -449,6 +449,14 @@ static void winraw_poll(void *d)
memcpy(&wr->keyboard, g_keyboard, sizeof(winraw_keyboard_t));
/* following keys are not handled by windows raw input api */
wr->keyboard.keys[VK_LCONTROL] = GetAsyncKeyState(VK_LCONTROL) >> 1 ? 1 : 0;
wr->keyboard.keys[VK_RCONTROL] = GetAsyncKeyState(VK_RCONTROL) >> 1 ? 1 : 0;
wr->keyboard.keys[VK_LMENU] = GetAsyncKeyState(VK_LMENU) >> 1 ? 1 : 0;
wr->keyboard.keys[VK_RMENU] = GetAsyncKeyState(VK_RMENU) >> 1 ? 1 : 0;
wr->keyboard.keys[VK_LSHIFT] = GetAsyncKeyState(VK_LSHIFT) >> 1 ? 1 : 0;
wr->keyboard.keys[VK_RSHIFT] = GetAsyncKeyState(VK_RSHIFT) >> 1 ? 1 : 0;
for (i = 0; i < g_mouse_cnt; ++i)
{
wr->mice[i].x = g_mice[i].x;