summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/xkbsrv.h1
-rw-r--r--xkb/xkbAccessX.c6
2 files changed, 5 insertions, 2 deletions
diff --git a/include/xkbsrv.h b/include/xkbsrv.h
index 2b926a980..45e2e8c47 100644
--- a/include/xkbsrv.h
+++ b/include/xkbsrv.h
@@ -171,6 +171,7 @@ typedef struct _XkbSrvInfo {
KeyCode mouseKey;
KeyCode inactiveKey;
KeyCode slowKey;
+ KeyCode slowKeyEnableKey;
KeyCode repeatKey;
CARD8 krgTimerActive;
CARD8 beepType;
diff --git a/xkb/xkbAccessX.c b/xkb/xkbAccessX.c
index c1af32eb9..21df85d94 100644
--- a/xkb/xkbAccessX.c
+++ b/xkb/xkbAccessX.c
@@ -291,8 +291,8 @@ AccessXKRGExpire(OsTimerPtr timer, CARD32 now, pointer arg)
return 4000;
}
xkbi->krgTimerActive = _OFF_TIMER;
- cn.keycode = 0;
- cn.eventType = 0;
+ cn.keycode = xkbi->slowKeyEnableKey;
+ cn.eventType = KeyPress;
cn.requestMajor = 0;
cn.requestMinor = 0;
if (xkbi->desc->ctrls->enabled_ctrls & XkbSlowKeysMask) {
@@ -304,6 +304,7 @@ AccessXKRGExpire(OsTimerPtr timer, CARD32 now, pointer arg)
LogMessage(X_INFO, "XKB SlowKeys are now enabled. Hold shift to disable.\n");
}
+ xkbi->slowKeyEnableKey = 0;
return 0;
}
@@ -462,6 +463,7 @@ AccessXFilterPressEvent(DeviceEvent *event, DeviceIntPtr keybd)
if (ctrls->enabled_ctrls & XkbAccessXKeysMask) {
/* check for magic sequences */
if ((sym[0] == XK_Shift_R) || (sym[0] == XK_Shift_L)) {
+ xkbi->slowKeyEnableKey = key;
if (XkbAX_NeedFeedback(ctrls, XkbAX_SlowWarnFBMask)) {
xkbi->krgTimerActive = _KRG_WARN_TIMER;
xkbi->krgTimer = TimerSet(xkbi->krgTimer, 0, 4000,