diff options
author | marha <marha@users.sourceforge.net> | 2009-09-15 10:39:59 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-09-15 10:39:59 +0000 |
commit | a233ed27754bb0d373d63569d9a28aeb8fee5b82 (patch) | |
tree | 2732a9434bbc102653dc22df9887d94e19570836 /xorg-server/hw/dmx/input/usb-keyboard.c | |
parent | a915739887477b28d924ecc8417ee107d125bd6c (diff) | |
download | vcxsrv-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/usb-keyboard.c')
-rw-r--r-- | xorg-server/hw/dmx/input/usb-keyboard.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/xorg-server/hw/dmx/input/usb-keyboard.c b/xorg-server/hw/dmx/input/usb-keyboard.c index 12ca8ab96..c4667a3c3 100644 --- a/xorg-server/hw/dmx/input/usb-keyboard.c +++ b/xorg-server/hw/dmx/input/usb-keyboard.c @@ -85,6 +85,7 @@ * part of the Xserver tree. All calls to the dmx* layer are #defined * here for the .c file. The .h file will also have to be edited. */ #include "usb-keyboard.h" +#include <xkbsrv.h> #define GETPRIV myPrivate *priv \ = ((DMXLocalInputInfoPtr)(pDev->devicePrivate))->private @@ -296,7 +297,7 @@ static void kbdUSBConvert(DevicePtr pDev, BLOCK block) { GETPRIV; - KeySymsPtr pKeySyms = &priv->pDevice->key->curKeySyms; + XkbSrvInfoPtr xkbi = priv->pKeyboard->key->xkbInfo; int type; int keyCode; KeySym keySym = NoSymbol; @@ -308,9 +309,13 @@ static void kbdUSBConvert(DevicePtr pDev, /* 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: |