From b8cf4153f84404b2a1b62a247d5d36d24bf481da Mon Sep 17 00:00:00 2001 From: Colin Harrison Date: Fri, 26 Feb 2010 14:41:00 +0000 Subject: Xming: Dead code removal Remove some dead code, mostly code made obsolete by mandatory XKB Signed-off-by: Jon TURNEY Reviewed-by: Jon TURNEY --- hw/xwin/winkeybd.c | 86 ------------------------------------------------------ 1 file changed, 86 deletions(-) (limited to 'hw/xwin/winkeybd.c') diff --git a/hw/xwin/winkeybd.c b/hw/xwin/winkeybd.c index a423b499a..ad9e66a0b 100644 --- a/hw/xwin/winkeybd.c +++ b/hw/xwin/winkeybd.c @@ -48,9 +48,6 @@ static Bool g_winKeyState[NUM_KEYCODES]; * Local prototypes */ -static void -winGetKeyMappings (KeySymsPtr pKeySyms, CARD8 *pModMap); - static void winKeybdBell (int iPercent, DeviceIntPtr pDeviceInt, pointer pCtrl, int iClass); @@ -119,89 +116,6 @@ winTranslateKey (WPARAM wParam, LPARAM lParam, int *piScanCode) } -/* - * We call this function from winKeybdProc when we are - * initializing the keyboard. - */ - -static void -winGetKeyMappings (KeySymsPtr pKeySyms, CARD8 *pModMap) -{ - int i; - KeySym *pMap = map; - KeySym *pKeySym; - - /* - * Initialize all key states to up... which may not be true - * but it is close enough. - */ - ZeroMemory (g_winKeyState, sizeof (g_winKeyState[0]) * NUM_KEYCODES); - - /* MAP_LENGTH is defined in Xserver/include/input.h to be 256 */ - for (i = 0; i < MAP_LENGTH; i++) - pModMap[i] = NoSymbol; /* make sure it is restored */ - - /* Loop through all valid entries in the key symbol table */ - for (pKeySym = pMap, i = MIN_KEYCODE; - i < (MIN_KEYCODE + NUM_KEYCODES); - i++, pKeySym += GLYPHS_PER_KEY) - { - switch (*pKeySym) - { - case XK_Shift_L: - case XK_Shift_R: - pModMap[i] = ShiftMask; - break; - - case XK_Control_L: - case XK_Control_R: - pModMap[i] = ControlMask; - break; - - case XK_Caps_Lock: - pModMap[i] = LockMask; - break; - - case XK_Alt_L: - case XK_Alt_R: - pModMap[i] = AltMask; - break; - - case XK_Num_Lock: - pModMap[i] = NumLockMask; - break; - - case XK_Scroll_Lock: - pModMap[i] = ScrollLockMask; - break; - -#if 0 - case XK_Super_L: - case XK_Super_R: - pModMap[i] = Mod4Mask; - break; -#else - /* Hirigana/Katakana toggle */ - case XK_Kana_Lock: - case XK_Kana_Shift: - pModMap[i] = KanaMask; - break; -#endif - - /* alternate toggle for multinational support */ - case XK_Mode_switch: - pModMap[i] = AltLangMask; - break; - } - } - - pKeySyms->map = (KeySym *) pMap; - pKeySyms->mapWidth = GLYPHS_PER_KEY; - pKeySyms->minKeyCode = MIN_KEYCODE; - pKeySyms->maxKeyCode = MAX_KEYCODE; -} - - /* Ring the keyboard bell (system speaker on PCs) */ static void winKeybdBell (int iPercent, DeviceIntPtr pDeviceInt, -- cgit v1.2.1