[PATCH] xkb: Don't press+release keys on key events

Matthias Hopf mhopf at suse.de
Fri Jun 5 11:15:39 PDT 2009


On Jun 04, 09 21:54:42 +1000, Daniel Stone wrote:
> On Wed, May 20, 2009 at 02:46:17PM +0200, Matthias Hopf wrote:
> > I'm on vacation next week, and will commit this patch afterwards if
> > nobody objects.
> Please don't: I don't think it's correct.
> 
> If this is a key release event for a key which is already released, then
> send a KeyPress followed by a KeyRelease.  This mirrors the behaviour
> for KeyPress, where a press event for a key which is already pressed
> sends a KeyRelease followed by a KeyPress.

Yes, but for the later case I can see a use case (key repeat
generation), while for the former I can't.

> We shouldn't be generating releases for keys which are up, anyway.  How
> are you getting those?

Under some (rare) circumstances we get KeyRelease events for F7 when
switching back to X from a console. This happens for drivers that switch
very fast, e.g. fbdev (because no mode switching is involved).
These trigger a press+release by this code.

> As Peter said anyway, driver-triggered key repeating is deprecated, and
> the XKB autorepeat mechanism should be used.  I'm not really happy with

In that case both code paths should be removed.

> the way actions work at the moment, so if you want to file a bug and
> assign it to me and Cc Peter, I'll hopefully get it sorted for 1.7.

Will do that. Next week, I have to run now.

CU and happy weekend

Matthias

-- 
Matthias Hopf <mhopf at suse.de>      __        __   __
Maxfeldstr. 5 / 90409 Nuernberg   (_   | |  (_   |__          mat at mshopf.de
Phone +49-911-74053-715           __)  |_|  __)  |__  R & D   www.mshopf.de


More information about the xorg-devel mailing list