Some users get F7 delivered to apps when switching from console to X. After some debugging I found the culprit, but am unsure whether I'm doing something stupid with this patch.
Given the popularity of the xkb layer probably only few can comment here. Daniel? Peter? IMHO the key repeat logic is broken here, Press+Release events should only be committed if the key state is down, not for up AND down. I verified that key repeat is still working, and so far I couldn't find any side effects - but of course I don't have all keyboard layouts and special hardware and architectures. I'm on vacation next week, and will commit this patch afterwards if nobody objects. Matthias -- Matthias Hopf <[email protected]> __ __ __ Maxfeldstr. 5 / 90409 Nuernberg (_ | | (_ |__ [email protected] Phone +49-911-74053-715 __) |_| __) |__ R & D www.mshopf.de
>From 0f64eab6c2a99d686602d88f33624e3b512843d1 Mon Sep 17 00:00:00 2001 From: Matthias Hopf <[email protected]> Date: Wed, 20 May 2009 12:41:05 +0200 Subject: [PATCH] xkb: Don't press+release keys on key events. Fixes submission of F7 to apps on switch from console for drivers that switch fast enough (Novell bug #141443 from Januar 2006). --- xkb/xkbPrKeyEv.c | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/xkb/xkbPrKeyEv.c b/xkb/xkbPrKeyEv.c index effb0ea..a44fcbc 100644 --- a/xkb/xkbPrKeyEv.c +++ b/xkb/xkbPrKeyEv.c @@ -85,11 +85,6 @@ unsigned ndx; } else if (event->type == ET_KeyRelease && (!(keyc->down[key>>3]&(1<<(key&7))))) { - XkbLastRepeatEvent= (pointer)event; - event->type = ET_KeyPress; - XkbHandleActions(keybd, keybd, event); - event->type = ET_KeyRelease; - XkbHandleActions(keybd, keybd, event); XkbLastRepeatEvent= NULL; return; } -- 1.6.0.2
_______________________________________________ xorg-devel mailing list [email protected] http://lists.x.org/mailman/listinfo/xorg-devel
