diff options
author | Egbert Eich <eich@suse.de> | 2005-01-10 17:44:39 +0000 |
---|---|---|
committer | Egbert Eich <eich@suse.de> | 2005-01-10 17:44:39 +0000 |
commit | b7f68e909640008e831c2ddb67ca4fb9515cec04 (patch) | |
tree | 1cbbe13f9090892a29cc41b5ad6f24ef985b48b1 | |
parent | b04ef340e213badb2e44fb669583b490f7278969 (diff) |
PC keyboards internally generate a different scan code when the ALT
modifier is pressed with the SysReq/Print key. Since X expects the same
scancode regardless of the modifier the keyboard driver has to 'map the
code back'. So far it does so when seeing the SysReq scancode without
checking if the modifier is on. If this scancode is also sent by
another key on an extended keyboard it receives the same remapping.
Fix: Add check for ALT modifier down before doing the remapping (Helmut
Fahrion).
-rw-r--r-- | src/kbd.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,4 +1,4 @@ -/* $XdotOrg: xc/programs/Xserver/hw/xfree86/input/keyboard/kbd.c,v 1.7 2004/12/03 23:30:48 herrb Exp $ */ +/* $XdotOrg: xc/programs/Xserver/hw/xfree86/input/keyboard/kbd.c,v 1.8 2004/12/06 21:51:11 herrb Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/input/keyboard/kbd.c,v 1.8 2003/11/03 05:11:47 tsi Exp $ */ /* @@ -12,7 +12,7 @@ * xf86Events.c and xf86Io.c which are * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany. */ -/* $XdotOrg: xc/programs/Xserver/hw/xfree86/input/keyboard/kbd.c,v 1.7 2004/12/03 23:30:48 herrb Exp $ */ +/* $XdotOrg: xc/programs/Xserver/hw/xfree86/input/keyboard/kbd.c,v 1.8 2004/12/06 21:51:11 herrb Exp $ */ #define NEED_EVENTS #include "X.h" @@ -596,8 +596,8 @@ PostKbdEvent(InputInfoPtr pInfo, unsigned int scanCode, Bool down) * they need to get the same key code as the base key on the same * physical keyboard key. */ - if (scanCode == KEY_SysReqest) - scanCode = KEY_Print; + if (ModifierDown(AltMask) && (scanCode == KEY_SysReqest)) + scanCode = KEY_Print; else if (scanCode == KEY_Break) scanCode = KEY_Pause; #endif |