sajad torkamani

The following process works on Ubuntu 20.04.1 but it should also work on Ubuntu 14.04 and above.

Check default repeat interval and delay

Before making any changes, it's a good idea to note the default values in case you want to restore them.

gsettings get org.gnome.desktop.peripherals.keyboard repeat-interval
# Outputs uint32 43 on Ubuntu 20.04.1

gsettings get org.gnome.desktop.peripherals.keyboard delay
# Outputs uint32 774 on Ubuntu 20.04.1

Set new repeat interval and delay

Use whatever values you want but the values below are a pretty good improvement on the default values.

gsettings set org.gnome.desktop.peripherals.keyboard repeat-interval 30
gsettings set org.gnome.desktop.peripherals.keyboard delay 250

Or if you want to put the changes in a bash script, say a keyboard_speed.sh file.

#!/usr/bin/env bash

REPEAT_INTERVAL=30
DELAY=250

gsettings set org.gnome.desktop.peripherals.keyboard repeat-interval $REPEAT_INTERVAL
gsettings set org.gnome.desktop.peripherals.keyboard delay $DELAY

I personally place such system configuration changes inside little bash scripts and then source them from my .zshrc or .bashrc file. This way, I can clearly see all the custom changes I've made and it makes it easy to replicate the same changes on different machines.

Tagged: Unix