[Bug 1738] New: Want smart key repeat

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Oct 30 12:55:24 PDT 2004

Please do not reply to this email: if you want to comment on the bug, go to          
the URL shown below and enter yourcomments there.   
           Summary: Want smart key repeat
           Product: xorg
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Input/Keyboard
        AssignedTo: xorg-bugzilla-noise at freedesktop.org
        ReportedBy: walles at mailblocks.com

About fifteen years ago I used a key repeat enhancment program for some version
of DOS called "Hyperkey".  It did something both smart and simple that I haven't
seen since, and that I'd like to see again.

The problem is as follows:  Imagine you have an X app that is slow to accept
keyboard input.  Now, press and hold the "u" key for five seconds.  Release "u".

Now, what most people would want is that as soon as you let go of the "u" key,
the app stops printing "u"s.  What happens in reality is that X has been
queueing up "u"s for five seconds, and it won't stop delivering the enqueued
"u"s to the app until the app has eaten all of them.

If I've set the key repeat speed to one repetition each 50ms, X will enqueue
20*5=100 "u"s in five secs.  If the app eats one "u" per second, I won't be able
to type anything else for about 100 seconds.  Bad.

The way Hyperkey worked however was that:
1. If a user types one character, enqueue it unconditionally.
2. If a user presses and holds any key, don't enqueue it at all.  Instead, give
the app one of that key when the app asks for it, but no more often than the key
repeat setting allows.

The effect of this is that in the above example, when I press and hold "u" for
five secs, the queue will be empty when I release the "u" key.  Thus, the app
behaves as we want.

Having tried this in practice, I can assure you it works very well, well enough
for me to remember it for fifteen years :-).        
Configure bugmail: https://freedesktop.org/bugzilla/userprefs.cgi?tab=email       
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the xorg-bugzilla-noise mailing list