From b19fdd86cff846bae61b94f8c7a5f21910c4c452 Mon Sep 17 00:00:00 2001 From: crs Date: Fri, 3 May 2002 12:23:48 +0000 Subject: [PATCH] fixed handling of shift+tab on a system that can map ISO_Left_Tab. now tries to map ISO_Left_Tab without shift first then falls back to Tab (note that if ISO_Left_Tab can be mapped but requires a modifier then the modifier will be added). also changed attempt to map ISO_Left_Tab as a backup to Tab to request the shift modifier whether or not the primary screen requested it. --- client/CXWindowsSecondaryScreen.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/client/CXWindowsSecondaryScreen.cpp b/client/CXWindowsSecondaryScreen.cpp index 668f4635..54b915b2 100644 --- a/client/CXWindowsSecondaryScreen.cpp +++ b/client/CXWindowsSecondaryScreen.cpp @@ -615,6 +615,15 @@ bool CXWindowsSecondaryScreen::findKeyCode( KeyID id, unsigned int maskIn) const { + // if XK_Tab is requested with shift active then try XK_ISO_Left_Tab + // instead. if that doesn't work, we'll fall back to XK_Tab with + // shift active. this is to handle primary screens that don't map + // XK_ISO_Left_Tab sending events to secondary screens that do. + if (id == XK_Tab && (maskIn & ShiftMask) != 0) { + id = XK_ISO_Left_Tab; + maskIn &= ~ShiftMask; + } + // find a keycode to generate id. XKeysymToKeycode() almost does // what we need but won't tell us which index to use with the // keycode. return false if there's no keycode to generate id. @@ -666,7 +675,8 @@ bool CXWindowsSecondaryScreen::findKeyCode( break; case XK_ISO_Left_Tab: - id = XK_Tab; + id = XK_Tab; + maskIn |= ShiftMask; break; default: