Keyboard: added comment for GH558 and removed some debug logging

This commit is contained in:
tomcw 2018-07-27 22:05:59 +01:00
parent 6ed354714e
commit a4f225555f
2 changed files with 2 additions and 5 deletions

View File

@ -27,7 +27,7 @@ extern "C" __declspec(dllexport) LRESULT CALLBACK LowLevelKeyboardProc(
// . For: Microsoft PS/2/Win7-64, VAIO laptop/Win7-64, Microsoft USB/Win10-64
// NB. WM_KEYDOWN also includes a 9/10-bit? scanCode: LCONTROL=0x1D, RCONTROL=0x11D, RMENU=0x1D(not 0x21D)
// . Can't suppress in app, since scanCode is not >= 0x200
if (pKbdLlHookStruct->vkCode == VK_LCONTROL && pKbdLlHookStruct->scanCode >= 0x200)
if (pKbdLlHookStruct->vkCode == VK_LCONTROL && pKbdLlHookStruct->scanCode >= 0x200) // GH#558
{
suppress = true;
}

View File

@ -306,7 +306,7 @@ void KeybQueueKeypress (WPARAM key, Keystroke_e bASCII)
return;
keycode = n;
}
else if ((GetKeyState(VK_RMENU) < 0)) // Right Alt (aka Alt Gr)
else if ((GetKeyState(VK_RMENU) < 0)) // Right Alt (aka Alt Gr) - GH#558
{
if (IsVirtualKeyAnAppleIIKey(key))
{
@ -320,10 +320,7 @@ void KeybQueueKeypress (WPARAM key, Keystroke_e bASCII)
if ( (GetKeyState(VK_SHIFT) >= 0) && !g_bCapsLock )
newKey += 'a' - 'A'; // convert to lowercase key
else if (GetKeyState(VK_CONTROL) < 0)
{
LogOutput("L-Control=%d, R-Control=%d\n", GetKeyState(VK_LCONTROL), GetKeyState(VK_RCONTROL));
newKey -= 'A' - 1; // convert to control-key
}
}
PostMessage(g_hFrameWindow, WM_CHAR, newKey, 0);