diff --git a/xkb/xkbAccessX.c b/xkb/xkbAccessX.c index 4c6e3d4..1c09539 100644 --- a/xkb/xkbAccessX.c +++ b/xkb/xkbAccessX.c @@ -308,14 +308,19 @@ xkbControlsNotify cn; static CARD32 AccessXRepeatKeyExpire(OsTimerPtr timer,CARD32 now,pointer arg) { -XkbSrvInfoPtr xkbi= ((DeviceIntPtr)arg)->key->xkbInfo; KeyCode key; +DeviceIntPtr dev = (DeviceIntPtr)arg; +XkbSrvInfoPtr xkbi= dev->key->xkbInfo; +BOOL coreEvent = FALSE; if (xkbi->repeatKey==0) return 0; + + coreEvent = (dev == inputInfo.keyboard); + key= xkbi->repeatKey; - AccessXKeyboardEvent((DeviceIntPtr)arg,KeyRelease,key,True); - AccessXKeyboardEvent((DeviceIntPtr)arg,KeyPress,key,True); + AccessXKeyboardEvent(dev, coreEvent ? KeyRelease : DeviceKeyRelease,key,True); + AccessXKeyboardEvent(dev, coreEvent ? KeyPress : DeviceKeyPress ,key,True); return xkbi->desc->ctrls->repeat_interval; }