aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/dmx/input/lnx-keyboard.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-09-15 10:39:59 +0000
committermarha <marha@users.sourceforge.net>2009-09-15 10:39:59 +0000
commita233ed27754bb0d373d63569d9a28aeb8fee5b82 (patch)
tree2732a9434bbc102653dc22df9887d94e19570836 /xorg-server/hw/dmx/input/lnx-keyboard.c
parenta915739887477b28d924ecc8417ee107d125bd6c (diff)
downloadvcxsrv-a233ed27754bb0d373d63569d9a28aeb8fee5b82.tar.gz
vcxsrv-a233ed27754bb0d373d63569d9a28aeb8fee5b82.tar.bz2
vcxsrv-a233ed27754bb0d373d63569d9a28aeb8fee5b82.zip
Checked in xorg-server-1.6.99.901
Diffstat (limited to 'xorg-server/hw/dmx/input/lnx-keyboard.c')
-rw-r--r--xorg-server/hw/dmx/input/lnx-keyboard.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/xorg-server/hw/dmx/input/lnx-keyboard.c b/xorg-server/hw/dmx/input/lnx-keyboard.c
index 744b6ace5..939a32f07 100644
--- a/xorg-server/hw/dmx/input/lnx-keyboard.c
+++ b/xorg-server/hw/dmx/input/lnx-keyboard.c
@@ -167,6 +167,7 @@
#include "xf86Keymap.h"
#endif
#include <linux/keyboard.h>
+#include <xkbsrv.h>
#define NUM_AT2LNX (sizeof(at2lnx) / sizeof(at2lnx[0]))
#define NUM_STATE_ENTRIES (256/32)
@@ -660,7 +661,7 @@ static void kbdLinuxConvert(DevicePtr pDev,
BLOCK block)
{
GETPRIV;
- KeySymsPtr pKeySyms = &priv->pKeyboard->key->curKeySyms;
+ XkbSrvInfoPtr xkbi = priv->pKeyboard->key->xkbInfo;
int type;
KeySym keySym = NoSymbol;
int keyCode;
@@ -673,10 +674,14 @@ static void kbdLinuxConvert(DevicePtr pDev,
keyCode = (scanCode & 0x7f) + MIN_KEYCODE;
/* Handle repeats */
-
- if (keyCode >= pKeySyms->minKeyCode && keyCode <= pKeySyms->maxKeyCode) {
- keySym = pKeySyms->map[(keyCode - pKeySyms->minKeyCode)
- * pKeySyms->mapWidth];
+
+ if (keyCode >= xkbi->desc->min_key_code &&
+ keyCode <= xkbi->desc->max_key_code) {
+
+ int effectiveGroup = XkbGetEffectiveGroup(xkbi,
+ &xkbi->state,
+ scanCode);
+ keySym = XkbKeySym(xkbi->desc, scanCode, effectiveGroup);
#if 0
switch (keySym) {
case XK_Num_Lock:
@@ -690,7 +695,7 @@ static void kbdLinuxConvert(DevicePtr pDev,
break;
}
#endif
-
+
/* If key is already down, ignore or autorepeat */
if (type == KeyPress && kbdLinuxKeyDown(priv, keyCode)) {
KbdFeedbackClassRec *feed = priv->pKeyboard->kbdfeed;