Fixed ctrl and alt keys on win32 clients. Was broken by a recent

fix to character handling.
This commit is contained in:
crs 2003-06-02 20:07:16 +00:00
parent c70ca5fbff
commit 7464e99ba7
1 changed files with 9 additions and 1 deletions

View File

@ -1030,7 +1030,7 @@ CMSWindowsSecondaryScreen::mapCharacter(Keystrokes& keys,
// strip them both out. // strip them both out.
if ((desiredMask & (KeyModifierControl | KeyModifierAlt)) == if ((desiredMask & (KeyModifierControl | KeyModifierAlt)) ==
(KeyModifierControl | KeyModifierAlt)) { (KeyModifierControl | KeyModifierAlt)) {
outMask &= ~(KeyModifierControl | KeyModifierAlt); desiredMask &= ~(KeyModifierControl | KeyModifierAlt);
} }
// strip out the desired shift state. we're forced to use // strip out the desired shift state. we're forced to use
@ -1049,6 +1049,14 @@ CMSWindowsSecondaryScreen::mapCharacter(Keystrokes& keys,
outMask |= KeyModifierAlt; 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 // handle combination of caps-lock and shift. if caps-lock is
// off locally then use shift as necessary. if caps-lock is on // off locally then use shift as necessary. if caps-lock is on
// locally then it reverses the meaning of shift for keys that // locally then it reverses the meaning of shift for keys that