Thread (2 messages) 2 messages, 2 authors, 2009-01-13

Re: [PATCH] input: input: stop autorepeat timer on key release

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2009-01-13 05:03:16

On Mon, Jan 12, 2009 at 09:51:03AM +0100, Johannes Berg wrote:
On Sun, 2009-01-11 at 23:36 -0800, Dmitry Torokhov wrote:
quoted
Hi Johannes,

On Tue, Jan 06, 2009 at 12:26:24PM +0100, Johannes Berg wrote:
quoted
Whenever you press and then release a key, the CPU wakes up
three times:
 * press
 * release
 * autorepeat timer exactly 250ms after press

The autorepeat timer has nothing to do, obviously, since you already
have released the key, so stop it on key release.
This introduces a slight change in behaviour (the key that is released
may not be one that is being autorepeated) but I think it still makes
sense to do it.
Hmm, good point, I thought it didn't, but it does when you press a, b
wait, release a then b doesn't continue autorepeating. Seems like a
corner case though, so I agree. We could fix that by checking which key
is being autorepeated though, I'd think, see below (untested as of now)
I actually think the original change was better - sometimes when shift or
alt or ctrl key gets stuck it takes time to figure out what happened. If
we stop autorepeat upon release of any key it will recover much quicker.

-- 
Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help