mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-04-27 14:10:39 +02:00
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
1 changed files with 4 additions and 1 deletions
|
|
@ -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…
Add table
Reference in a new issue