aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/dmx/input/lnx-keyboard.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-09-15 15:05:16 +0000
committermarha <marha@users.sourceforge.net>2009-09-15 15:05:16 +0000
commit1915b018a54e991c9289ee0c03488294e890caea (patch)
tree0eccc8afdcbcee10f91cfe418fc8c7cdcd4b0163 /xorg-server/hw/dmx/input/lnx-keyboard.c
parent8bfa2f879ea38340a633c29120758a390b63667e (diff)
parent4db64b701ca08687df5932321d48f2ef29b99fed (diff)
downloadvcxsrv-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/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;