GNOME Bugzilla – Bug 119300
Unable to set keyboard autorepeat rate & delay
Last modified: 2004-12-22 21:47:04 UTC
I'm using the gnome-current under gentoo. Since gnome 2.3.3, If you try to change the autorepeat rate & delay in the keyboard applet or in the keyboard accesibility applet, the changes are not saved, and the bars appears at the minimun all the time. What is worse, if the autorepeat is activated, with each key you press you gett two chars, and trying to write "abc" results in "aabbcc" I set this bug as critical, because for normal people once set the autorepeat all cames unusable, and you have to figure that disabling autorepeat at least you can write. And anyway, not having the autorepeat is awfull when yoo do a lot of console work...
Urk. Jonathan, Jody, any idea what caused this? Fuzz says he can reproduce. [I can't, my HEAD setup is totally borked ATM.]
I can easily reproduce using both version 2.3.4 and 2.3.5 of gnome-keyboard-properties. Trying to change the repeat delay slider will set the delay to 1 milliscond (despite the fact that the GUI "looks right") and trying to change the repeat rate slider will set the repeat rate to 0 (which apparently means repeat exactly once, regardless of how long the key is held down; again the GUI "looks right" but is ignored as the rate is set to 0). This can be verified by running while (true); do xset q | grep "repeat delay"; done at the bash prompt before running gnome-keyboard-properties. One can workaround this bug by making a ffiixx--mmee..sshh script (I suggest doing this first, otherwise you have to use the virtual console) which executes 'xset r rate 500 40'. Also, note that logging in and out does not fix this problem (and if you used the workaround, you'll have to do it each time you log out and back in as well, unless you can nuke ~/.gconf/desktop/gnome/peripherals/keyboard/ from the virtual console after logging out). I'm going to take a look at the code and see if I can fix it, but since I'm just a wannabe hacker (who has only ever fixed one user visible gnome bug), no guarantees. :)
Yeah... some people on the forums are noticing the same too. One of them have said that changing the values directly on the gconf-editor works, but I didn't manage to find which entries are suposed to contain this values (I look under desktop/gnome/accesibility, desktop/gnome/interface and other places). Even on the Schemas I can't find the entries. Maybe is that the problem? that there is no schema for the values? The posts in the gentoo forums: ------ *me: I have problems to set the keyboard autorepeat rate & delay. If I change my settings in the keyboard applet or the accesibility keyb applet the bars are always set back to the minimun, and my keyboard writes each key twice. I have to disable totally the autorepeat to be able to write things normally, and not each key twice. Anybody has the same problem? ----- *Lin_Matt: I'm having much the same problem myself... Only it likes to give me 4 or 5 per keystroke. Ya might wanna report that one on bugs.gnome.org... ----- *kirsan: I hit this one during 2.3.3. Pop open your gconf-editor, and edit the accessibility keys to get the values you want. Reporting it isn't a bad idea either. -----
Hi Elijah. There is a simpler workarround if you don't have the script: You can disable the autorepeat in the keyboard applet, and you will be able to write one char with each keystroke.
Ohhh! You give me the clue to find the gconf entries! desktop/gnome/peripherals/keyboard/ There you can change manually with the gconf-editor the settings... :) nice... I could now use confortably gnome until this bug is solved. nice!
Created attachment 19010 [details] [review] Patch that fixes this for me
I just attached a patch (to be applied to gnome-control-center/capplets/keyboard/gnome-keyboard-properties.c) which fixes this problem for me. I don't completely understand the entire call-back structure (I'm still very much a newbie to gnome programming), so I don't know if this is an ugly work-around or if it causes other problems. But, it WORKSFORME. :) Also, a big hint to tracking down this problem is checking out ~/.xsession-errors. That file gets filled with failed assertions when using the gnome-keyboard-properties executable without my patch (I found this out while looking through the code on my way to creating the patch). Finally, luis said that since I found this wasn't something that could be fixed by the end user in any reasonable way (even logging out and logging in won't fix the problem), that priority being urgent sounded reasonable. So I'm going to mark it as such.
Dang. Doesn't quite WORKFORME. If the accessibility window is up (i.e. the window that comes up from clicking on the accessibility button on the main window from the gnome-keyboard-properties window), then the callback for that window will screw things up. However, if that window isn't up, it does seem to work for me. I'm looking into it...
Created attachment 19013 [details] [review] New and improved patch
Oops, the above patch includes both the patch from bug 119157 as well as another bug I found (namely, that gnome-accessibility-keyboard-properties allows different ranges for the repeat rate than does gnome-keyboard-properties). I'll post another patch shortly which only has the patch relevant to this bug.
Created attachment 19014 [details] [review] Portion of the improved patch that fixes the auto-repeat problems
The portion of the patch that deals with the fact that gnome-keyboard-properties & gnome-accessibility-keyboard-properties both allow the keyboard repeat rate & delay to be set but allow different ranges can be found in bug 119374. That bug also contains my rants about the fact that I don't think this work should be duplicated (and that the gnome-accessibility-keyboard-properties has a better UI for the repeat rate/delay stuff than does gnome-keyboard-properties). Alright, enough spam for one day...
I like more the second patch as it is more complete. The part dealing with the keyboard applet is correct, and solves the problem for me too.
The patch has been committed. jrb also caught other problems when he submitted the patch. Marking as fixed.