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
e4054e5cb3
commit
c42427f63f
|
@ -696,7 +696,8 @@ GetKeyboardValuatorEvents(EventList *events, DeviceIntPtr pDev, int type,
|
|||
return 0;
|
||||
|
||||
map = pDev->key->curKeySyms.map;
|
||||
sym = map[key_code * pDev->key->curKeySyms.mapWidth];
|
||||
sym = map[(key_code - pDev->key->curKeySyms.minKeyCode)
|
||||
* pDev->key->curKeySyms.mapWidth];
|
||||
|
||||
master = pDev->u.master;
|
||||
if (master && master->u.lastSlave != pDev)
|
||||
|
|
Loading…
Reference in New Issue