cancel Control cancelling of Shift for Mac OS X and X

svn: r6850
This commit is contained in:
Matthew Flatt 2007-07-08 00:35:02 +00:00
parent a1e2d59690
commit 3b9177410f
3 changed files with 6 additions and 6 deletions

View File

@ -615,9 +615,9 @@ void wxKeymap::MapFunction(wxchar *keys, char *fname)
if ((code > 0) && (code < 127) && isalpha(code)) {
if (shift > 0) {
#ifdef wx_mac
if ((meta < 1) && (ctrl < 1))
if (meta < 1)
#endif
#if defined(wx_msw) || defined(wx_xt)
#if defined(wx_msw)
if ((ctrl < 1) || (meta > 0))
#endif
code = toupper(code);

View File

@ -701,9 +701,9 @@ void wxApp::doMacKeyUpDown(Bool down)
mods = cCurrentEvent.modifiers;
/* Strip Caps Lock and Shift when Control is pressed. */
/* Strip Caps Lock when Control is pressed. */
if (mods & (controlKey & wxMacDisableMods))
mods -= (mods & (alphaLock | shiftKey));
mods -= (mods & alphaLock);
if (mods & cmdKey) {
int mask;

View File

@ -1797,8 +1797,8 @@ Status wxWindow::LookupKey(int unshifted, int unalted, int caps_mode,
memcpy(&evt, &(xev->xkey), sizeof(XKeyPressedEvent));
if ((evt.state & ControlMask) && !(evt.state & Mod1Mask)) {
/* Control (and not AltGr) => cancel Shift and Caps Lock */
evt.state -= (evt.state & (ShiftMask | LockMask));
/* Control (and not AltGr) => cancel Caps Lock */
evt.state -= (evt.state & LockMask);
}
if (unshifted) {