Fix incorrect test regarding keyboard map.
In the map stored in each keyboard device, the first line refers to minimum keycode, i.e., the 0th line refers to keycode 8. When not using XKB the wrong test caused some keys to be interpreted as locks ('m' for instance). The had to be pressed twice to generate both KeyPress and KeyRelease events. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
c30f36c8c1
commit
e135a77b8b
@ -408,9 +408,12 @@ GetKeyboardValuatorEvents(xEvent *events, DeviceIntPtr pDev, int type,
|
||||
int numEvents = 0;
|
||||
CARD32 ms = 0;
|
||||
KeySym *map = pDev->key->curKeySyms.map;
|
||||
KeySym sym = map[key_code * pDev->key->curKeySyms.mapWidth];
|
||||
KeySym sym;
|
||||
deviceKeyButtonPointer *kbp = NULL;
|
||||
|
||||
sym = map[(key_code - pDev->key->curKeySyms.minKeyCode)
|
||||
* pDev->key->curKeySyms.mapWidth];
|
||||
|
||||
if (!events)
|
||||
return 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user