Summary: | Want smart key repeat | ||||||
---|---|---|---|---|---|---|---|
Product: | xorg | Reporter: | Johan Walles <johan.walles> | ||||
Component: | Lib/Xlib | Assignee: | Xorg Project Team <xorg-team> | ||||
Status: | RESOLVED NOTOURBUG | QA Contact: | Xorg Project Team <xorg-team> | ||||
Severity: | enhancement | ||||||
Priority: | high | CC: | alan.coopersmith | ||||
Version: | unspecified | ||||||
Hardware: | x86 (IA32) | ||||||
OS: | Linux (All) | ||||||
Whiteboard: | |||||||
i915 platform: | i915 features: | ||||||
Attachments: |
|
Description
Johan Walles
2004-10-30 12:55:24 UTC
Created attachment 2740 [details]
Repro: A GTK+ app with a slow text field
Here's a GTK+ app (build instructions within) with a text field that sleeps for
0,5s after each keypress. Run it, activate the "Slow" text field, press and
hold "u" for a while.
Currently the app becomes unusable until it has swallowed all the buffered
"u"s.
With a fix for this Enhancement request in place, the same app should stop
adding "u"s to the text field when I release "u".
Unfortunately, the X server sends the key events to the application as it generates them and has no way of knowing how fast the application is processing them. Thus, without a protocol change, I think the only way to fix this is client-side, though that could possibly be in libX11, the client toolkit or the client application itself. I'm not sure where the best place is, though I'd lean towards the toolkits. When XKB is active, clients can request to have auto-repeat generated events marked differently, so it could check the timestamps on auto-repeat events and discard those whose timestamps are beyond a certain threshold from the current time. If possible I'd like to put this before the toolkit comes in, as that would make it work for any toolkit. Client side is fine. So how does a client ask for the next event? I assume that's where one would want to put in a filter for this. Note that I haven't done any hacking on X prior to this, so if I give the impression that I don't know even basic stuff, that's probably correct. Sorry about the phenomenal bug spam, guys. Adding xorg-team@ to the QA contact so bugs don't get lost in future. (In reply to comment #3) > If possible I'd like to put this before the toolkit comes in, as that would > make > it work for any toolkit. Client side is fine. > > So how does a client ask for the next event? I assume that's where one would > want to put in a filter for this. > > Note that I haven't done any hacking on X prior to this, so if I give the > impression that I don't know even basic stuff, that's probably correct. this happens in libx11, with XNextEvent. unfortunately the details are quite abstract, and i can assure you that any attempt would almost certainly collapse the incredibly flimsy house of cards that is our input system. due to the nature (server pushes events out to the clients), there's really not much you can do on an xlib level. the individual toolkits could certainly peek ahead in the event queue, and drop all pending presses as soon as a release hits the queue, but anything you do in xlib is likely to break things horribly. -> notourbug; recommend taking it up with gtk/qt |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.