sexta-feira, 6 de janeiro de 2017

Configuring keyboard repeat rate on Gnome 3

It's been some years that I use a rather fast keyboard repeat interval. With a well tuned delay, it just seems to make a lot more sense to the programmer in me.

It allows me to focus on navigating the screen in more effective ways, like word-by-word instead of char-by-char, and also makes it quick to repeat keys when you intend to do so, like typing:


Can you type that without feeling like watching a slow motion movie?!

I don't really know when I started doing it, nor the original motivation. I think when I met Tim Ottinger in a coding dojo in Beijing he mentioned how frustrated he got whenever he touched somebody else's slow keyboard on a workshop or some other event, and would immediately suggest and show how to change the key repeat rate settings.
So it might have been Tim, or might have been someone else in that story, but the story is true :P

Last year, doing coding dojos in Brno, I've noticed the opposite feeling in people touching my "fast" keyboard... they often get so scared when they unintentionally seeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee


If you think fast key repeat rate is for you, here is how to set in in Gnome 3 (for reference, works on Fedora 25).

First, inspect your current settings:

$ gsettings list-recursively org.gnome.desktop.peripherals.keyboard                                        
org.gnome.desktop.peripherals.keyboard repeat-interval uint32 0
org.gnome.desktop.peripherals.keyboard delay uint32 500
org.gnome.desktop.peripherals.keyboard repeat true

I've set the repeat-interval to the fastest value, 0. And the delay is just the default, 500ms. The repeat value controls whether keys repeat or never repeat.

Set each key to your preferred value with the command:

$ gsettings set org.gnome.desktop.peripherals.keyboard KEY VALUE

Replace KEY and VALUE with the appropriate key and value.

Note: the same configuration is available in a graphical interface in Gnome Settings > Universal Access > Typing > Repeat Keys. Unfortunately, with that interface you only have dials, and no way to enter precise values or to inspect the current values.
If you want to do it with a graphical interface and have precise values, you can install and use the package dconf-editor.

Update: after a reboot I realized that the minimum usable value for repeat-interval is 1. It was apparently okay to set it to zero, but after a reboot I could not login on a Wayland session (crash caused by a division by zero...), while Xorg would let me login, but with the keyboard settings silently defaulted (though gsetttings and Universal Settings would still display the values I've configured).

Nenhum comentário: