diff options
author | marha <marha@users.sourceforge.net> | 2009-09-15 15:05:16 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-09-15 15:05:16 +0000 |
commit | 1915b018a54e991c9289ee0c03488294e890caea (patch) | |
tree | 0eccc8afdcbcee10f91cfe418fc8c7cdcd4b0163 /xorg-server/hw/dmx/input/usb-keyboard.c | |
parent | 8bfa2f879ea38340a633c29120758a390b63667e (diff) | |
parent | 4db64b701ca08687df5932321d48f2ef29b99fed (diff) | |
download | vcxsrv-1915b018a54e991c9289ee0c03488294e890caea.tar.gz vcxsrv-1915b018a54e991c9289ee0c03488294e890caea.tar.bz2 vcxsrv-1915b018a54e991c9289ee0c03488294e890caea.zip |
svn merge https://vcxsrv.svn.sourceforge.net/svnroot/vcxsrv/branches/released .
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: |