1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Windows: Allow detecting keydown state for extended keycodes

This commit is contained in:
reuk 2024-03-19 11:56:51 +00:00
parent 5957cef205
commit ebe954f176
No known key found for this signature in database
GPG key ID: FCB43929F012EE5C

View file

@ -4734,7 +4734,7 @@ bool KeyPress::isKeyCurrentlyDown (const int keyCode)
const auto k = [&]
{
if ((keyCode & extendedKeyModifier) != 0)
return keyCode;
return keyCode & (extendedKeyModifier - 1);
const auto vk = BYTE (VkKeyScan ((WCHAR) keyCode) & 0xff);
return vk != (BYTE) -1 ? vk : keyCode;