Added cmd line switch (-altgr-sends-wmchar) to enable sending WM_CHAR for key presses, when AltGr is down. (Fixes #625)

This commit is contained in:
tomcw
2019-03-03 14:32:19 +00:00
parent 82c2f3d142
commit cd9a207bee
5 changed files with 22 additions and 5 deletions
+7 -1
View File
@@ -53,11 +53,17 @@ static bool g_bCapsLock = true; //Caps lock key for Apple2 and Lat/Cyr lock for
static bool g_bP8CapsLock = true; //Caps lock key of Pravets 8A/C
static BYTE keycode = 0; // Current Apple keycode
static BOOL keywaiting = 0;
static bool g_bAltGrSendsWM_CHAR = false;
//
// ----- ALL GLOBALLY ACCESSIBLE FUNCTIONS ARE BELOW THIS LINE -----
//
void KeybSetAltGrSendsWM_CHAR(bool state)
{
g_bAltGrSendsWM_CHAR = state;
}
//===========================================================================
void KeybReset()
@@ -306,7 +312,7 @@ void KeybQueueKeypress (WPARAM key, Keystroke_e bASCII)
return;
keycode = n;
}
else if ((GetKeyState(VK_RMENU) < 0)) // Right Alt (aka Alt Gr) - GH#558
else if (g_bAltGrSendsWM_CHAR && (GetKeyState(VK_RMENU) < 0)) // Right Alt (aka Alt Gr) - GH#558, GH#625
{
if (IsVirtualKeyAnAppleIIKey(key))
{