aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winkeybd.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-02-23 12:35:44 +0100
committermarha <marha@users.sourceforge.net>2012-02-23 12:36:22 +0100
commit769a37773769b08829f68e7f5ce0fc3bf66f6445 (patch)
tree8f38c4a5164626cd50e5f09ab3cec0663fd833e8 /xorg-server/hw/xwin/winkeybd.c
parent50cb30a8b13f3218a1dc933a4584466f4d616438 (diff)
downloadvcxsrv-769a37773769b08829f68e7f5ce0fc3bf66f6445.tar.gz
vcxsrv-769a37773769b08829f68e7f5ce0fc3bf66f6445.tar.bz2
vcxsrv-769a37773769b08829f68e7f5ce0fc3bf66f6445.zip
Added taskbar grouping for windows 7
Diffstat (limited to 'xorg-server/hw/xwin/winkeybd.c')
-rw-r--r--xorg-server/hw/xwin/winkeybd.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/xorg-server/hw/xwin/winkeybd.c b/xorg-server/hw/xwin/winkeybd.c
index f5187571d..e11a71248 100644
--- a/xorg-server/hw/xwin/winkeybd.c
+++ b/xorg-server/hw/xwin/winkeybd.c
@@ -297,6 +297,29 @@ winRestoreModeKeyStates (void)
* have a logical XOR operator, so we use a macro instead.
*/
+ {
+ /* consider modifer keys */
+
+ BOOL ctrl = (GetAsyncKeyState (VK_CONTROL) < 0);
+ BOOL shift = (GetAsyncKeyState (VK_SHIFT) < 0);
+ BOOL alt = (GetAsyncKeyState (VK_LMENU) < 0);
+ BOOL altgr = (GetAsyncKeyState (VK_RMENU) < 0);
+
+ if (ctrl && altgr) ctrl = FALSE;
+
+ if (WIN_XOR (internalKeyStates & ControlMask, ctrl))
+ winSendKeyEvent (KEY_LCtrl, ctrl);
+
+ if (WIN_XOR (internalKeyStates & ShiftMask, shift))
+ winSendKeyEvent (KEY_ShiftL, shift);
+
+ if (WIN_XOR (internalKeyStates & Mod1Mask, alt))
+ winSendKeyEvent (KEY_Alt, alt);
+
+ if (WIN_XOR (internalKeyStates & Mod5Mask, altgr))
+ winSendKeyEvent (KEY_AltLang, altgr);
+ }
+
/* Has the key state changed? */
dwKeyState = GetKeyState (VK_NUMLOCK) & 0x0001;
if (WIN_XOR (internalKeyStates & NumLockMask, dwKeyState))