Keep track of which keycodes are reported down

master
Jacopo De Simoi 9 years ago committed by Jacopo De Simoi
parent bd354781d5
commit 583d092e10
  1. 3
      src/evdev.c
  2. 1
      src/evdev.h

@ -448,6 +448,7 @@ AhmStep2(InputInfoPtr pInfo, struct input_event *ev, int value, int code)
}
}
pEvdev->lastValue = value;
pEvdev->ahmDownKey[code] = value;
ahmLastEventDevice = pInfo;
}
@ -3030,10 +3031,12 @@ EvdevPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
pEvdev->lastValue = 0;
for(fromCode = 0; fromCode < 256; fromCode++){
/* Reset state */
pEvdev->transModCount[fromCode] = 0;
pEvdev->transModTable[fromCode] = 0;
pEvdev->transModFreeze[fromCode] = 0;
pEvdev->ahmDelayTable[fromCode] = 0;
pEvdev->ahmDownKey[fromCode] = 0;
}
/* set timeout for ahm */

@ -208,6 +208,7 @@ typedef struct {
int ahmDelayTable[256];
int ahmDelayedCode[2];
int ahmDownKey[256];
int ahmDelayedKeys;
int ahmResetTime;

Loading…
Cancel
Save