Commit f9b5bbaa authored by Peter Hutterer's avatar Peter Hutterer Committed by Adam Jackson

xkb: fix SlowKeys release/reject beeps

Wrong use of the mask here caused a beep whenever a key was rejected but
also when it was released after being accepted. Fix the mask to check
for the correct enabled controls.
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <>
Reviewed-by: Daniel Stone's avatarDaniel Stone <>
parent a6288f09
......@@ -618,6 +618,7 @@ AccessXFilterReleaseEvent(DeviceEvent *event, DeviceIntPtr keybd)
if (ctrls->enabled_ctrls & XkbSlowKeysMask) {
xkbAccessXNotify ev;
unsigned beep_type;
unsigned mask;
ev.keycode = key;
ev.slowKeysDelay = ctrls->slow_keys_delay;
......@@ -625,14 +626,16 @@ AccessXFilterReleaseEvent(DeviceEvent *event, DeviceIntPtr keybd)
if (BitIsOn(keybd->key->down, key) || (xkbi->mouseKey == key)) {
ev.detail = XkbAXN_SKRelease;
beep_type = _BEEP_SLOW_RELEASE;
mask = XkbAX_SKReleaseFBMask;
else {
ev.detail = XkbAXN_SKReject;
beep_type = _BEEP_SLOW_REJECT;
mask = XkbAX_SKRejectFBMask;
ignoreKeyEvent = TRUE;
XkbSendAccessXNotify(keybd, &ev);
if (XkbAX_NeedFeedback(ctrls, XkbAX_SKRejectFBMask)) {
if (XkbAX_NeedFeedback(ctrls, mask)) {
XkbDDXAccessXBeep(keybd, beep_type, XkbSlowKeysMask);
if (xkbi->slowKey == key)
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