Merge pull request #5031 from casdevel/winraw

Add L/R virtual keys handling
This commit is contained in:
Twinaphex 2017-06-06 18:44:49 +02:00 committed by GitHub
commit 89fe5625cb

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;