Is it possible to disable the keyboard repeat functionality, as is needed by various Flash games, through the command line?

Normally it can be disabled by going to settings -> keyboard and hitting the button, but I'm wondering if there's a command line / programmatic solution which I can implement into a program of mine.

  • Linux Mint is off-topic here, based on Ubuntu or not. Please ask on Unix & Linux.
    – muru
    Jan 22, 2015 at 5:27

3 Answers 3


You can use the xset utility, which works on the X.org level, across desktop environments. (The dconf / gsettings solution is Gnome specific.)

To switch off keyboard repeat:

xset r off

To switch keyboard repeat on again, with the same delay and rate settings as before:

xset r on

See man xset for details.


Of course it should be possible :)

Open the Terminal and execute the following command to disable it:

dconf write /org/gnome/settings-daemon/peripherals/keyboard/repeat false

If you want to set it to default value, use reset option as following:

dconf reset /org/gnome/settings-daemon/peripherals/keyboard/repeat

From man dconf:

dconf write KEY VALUE
dconf reset [-f] PATH
  • write: Write a new value to a key.
  • reset: Reset a key or an entire directory. For directories, -f must be specified.

Also you can use gsettings instead of dconf:

gsettings set org.gnome.settings-daemon.peripherals.keyboard repeat false

From man gsettings:

set    #  gsettings set SCHEMA [:PATH]  KEY VALUE
   Sets the value of KEY to VALUE. The value is specified as a serialised GVariant.

reset  # gsettings reset SCHEMA [:PATH]  KEY
   Resets KEY to its default value.

To disable key repeat for the entire keyboard:

xset r off

To disable key repeat for a specific key (for instance the key a, keycode 36):

xset -r 36

You can find the keycode of the key you want to disable by typing xev in a terminal and looking at the keycode value displayed.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .