mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-12-28 22:31:11 +00:00
Include scancode when reservewindowskey is enabled
Previously, only the keycode was being filled in. This worked in many cases, but it turns out that the scancode is also important in order to be compatible with some keycode mapping files. See discussion: https://www.emaculation.com/forum/viewtopic.php?p=72685
This commit is contained in:
parent
f1502fb6bd
commit
44f6eff928
@ -749,6 +749,7 @@ static LRESULT CALLBACK low_level_keyboard_hook(int nCode, WPARAM wParam, LPARAM
|
||||
memset(&e, 0, sizeof(e));
|
||||
e.type = (wParam == WM_KEYDOWN) ? SDL_KEYDOWN : SDL_KEYUP;
|
||||
e.key.keysym.sym = (p->vkCode == VK_LWIN) ? SDLK_LGUI : SDLK_RGUI;
|
||||
e.key.keysym.scancode = (p->vkCode == VK_LWIN) ? SDL_SCANCODE_LGUI : SDL_SCANCODE_RGUI;
|
||||
SDL_PushEvent(&e);
|
||||
return 1;
|
||||
}
|
||||
|
@ -877,6 +877,7 @@ static LRESULT CALLBACK low_level_keyboard_hook(int nCode, WPARAM wParam, LPARAM
|
||||
memset(&e, 0, sizeof(e));
|
||||
e.type = (wParam == WM_KEYDOWN) ? SDL_KEYDOWN : SDL_KEYUP;
|
||||
e.key.keysym.sym = (p->vkCode == VK_LWIN) ? SDLK_LGUI : SDLK_RGUI;
|
||||
e.key.keysym.scancode = (p->vkCode == VK_LWIN) ? SDL_SCANCODE_LGUI : SDL_SCANCODE_RGUI;
|
||||
SDL_PushEvent(&e);
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user