From 769a37773769b08829f68e7f5ce0fc3bf66f6445 Mon Sep 17 00:00:00 2001 From: marha Date: Thu, 23 Feb 2012 12:35:44 +0100 Subject: Added taskbar grouping for windows 7 --- xorg-server/hw/xwin/winkeybd.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'xorg-server/hw/xwin/winkeybd.c') 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)) -- cgit v1.2.3