xkb: fill in keycode and event type for slow keys enablement

eventType is set for the type that triggered a XkbControlsNotify event.
Technically, SlowKeys is triggered by a timer which doesn't have a matching
core event type. So we used to use 0 here.

Practically, the timer is triggered by a key press + hold and cancelled when
the key is released before the timeout expires. So we might as well set
KeyPress (keycode) in the ControlsNotify to give clients a chance to differ
between timer-triggered SlowKeys and client-triggered ones.

This is a chance in behaviour, though I suspect with little impact.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Daniel Stone <daniel@fooishbar.org>
This commit is contained in:
Peter Hutterer 2012-06-26 10:30:35 +10:00
commit 2c4388a00e
2 changed files with 5 additions and 2 deletions

View file

@ -171,6 +171,7 @@ typedef struct _XkbSrvInfo {
KeyCode mouseKey;
KeyCode inactiveKey;
KeyCode slowKey;
KeyCode slowKeyEnableKey;
KeyCode repeatKey;
CARD8 krgTimerActive;
CARD8 beepType;