From 7464e99ba7dd4ddfa0c9a74c4ac04e539aeafade Mon Sep 17 00:00:00 2001 From: crs Date: Mon, 2 Jun 2003 20:07:16 +0000 Subject: [PATCH] Fixed ctrl and alt keys on win32 clients. Was broken by a recent fix to character handling. --- lib/platform/CMSWindowsSecondaryScreen.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/platform/CMSWindowsSecondaryScreen.cpp b/lib/platform/CMSWindowsSecondaryScreen.cpp index b7c61b57..8b2658b1 100644 --- a/lib/platform/CMSWindowsSecondaryScreen.cpp +++ b/lib/platform/CMSWindowsSecondaryScreen.cpp @@ -1030,7 +1030,7 @@ CMSWindowsSecondaryScreen::mapCharacter(Keystrokes& keys, // strip them both out. if ((desiredMask & (KeyModifierControl | KeyModifierAlt)) == (KeyModifierControl | KeyModifierAlt)) { - outMask &= ~(KeyModifierControl | KeyModifierAlt); + desiredMask &= ~(KeyModifierControl | KeyModifierAlt); } // strip out the desired shift state. we're forced to use @@ -1049,6 +1049,14 @@ CMSWindowsSecondaryScreen::mapCharacter(Keystrokes& keys, outMask |= KeyModifierAlt; } + // use desired modifiers + if ((desiredMask & KeyModifierControl) != 0) { + outMask |= KeyModifierControl; + } + if ((desiredMask & KeyModifierAlt) != 0) { + outMask |= KeyModifierAlt; + } + // handle combination of caps-lock and shift. if caps-lock is // off locally then use shift as necessary. if caps-lock is on // locally then it reverses the meaning of shift for keys that