Commit ff41753b authored by Peter Hutterer's avatar Peter Hutterer
Browse files

xkb: warn if XKB SlowKeys have been automatically enabled

Slow keys are enabled when the XKB AccessX features are generally enabled
(ctrls->enabled_ctrls & XkbAccessXKeysMask) and either shift key is held for
8 seconds. For the unsuspecting user this appears as if the keyboard
suddenly stops working.

Print a warning to the log, so we can later tell them "told you so".
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <>
Reviewed-by: Dan Nicholson's avatarDan Nicholson <>
parent 12f9aaff
......@@ -295,10 +295,15 @@ AccessXKRGExpire(OsTimerPtr timer, CARD32 now, pointer arg)
cn.eventType = 0;
cn.requestMajor = 0;
cn.requestMinor = 0;
if (xkbi->desc->ctrls->enabled_ctrls & XkbSlowKeysMask)
if (xkbi->desc->ctrls->enabled_ctrls & XkbSlowKeysMask) {
AccessXKRGTurnOff((DeviceIntPtr) arg, &cn);
LogMessage(X_INFO, "XKB SlowKeys are disabled.\n");
else {
AccessXKRGTurnOn((DeviceIntPtr) arg, XkbSlowKeysMask, &cn);
LogMessage(X_INFO, "XKB SlowKeys are now enabled. Hold shift to disable.\n");
return 0;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment