04385c3d68
GNOME won't warn about it (#816764)
44 lines
1.5 KiB
Diff
44 lines
1.5 KiB
Diff
From 2503936e2be820220ba0c4d80e45e268d433c063 Mon Sep 17 00:00:00 2001
|
|
From: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Date: Wed, 6 Jun 2012 14:38:49 +1000
|
|
Subject: [PATCH] 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 <peter.hutterer@who-t.net>
|
|
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
|
|
---
|
|
xkb/xkbAccessX.c | 9 +++++++--
|
|
1 file changed, 7 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/xkb/xkbAccessX.c b/xkb/xkbAccessX.c
|
|
index 111bf9f..765772b 100644
|
|
--- a/xkb/xkbAccessX.c
|
|
+++ b/xkb/xkbAccessX.c
|
|
@@ -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);
|
|
- else
|
|
+ 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;
|
|
}
|
|
|
|
--
|
|
1.7.10.2
|
|
|