16

On logging into Oneiric, my repeat key functionality doesn't work. Holding in a key will not repeat. I can work around this by going into System Settings>>Keyboard and slightly adjusting the delay and/or speed and then the repeat keys will work for that session only.

Shutting down and restarting again breaks the repeat keys.

What can I do to fix this?

Jorge Castro
  • 71,754
  • Me too! I am interested to see if there is a solution around. My current workaround is also going into the System Settings->Keyboard->Deselect "Key presses repeat when key is held down"->Select that same option again. Pretty darn frustrating – Antony Nov 29 '11 at 02:54
  • Probably should add that it is happening on a ThinkPad T400. It is unclear when the keypress setting stops working, as searching inside /var/log/syslog yields nothing just yet (or maybe I am just looking at the wrong log) – Antony Nov 29 '11 at 04:11
  • Not sure if this is still an issue for you, but the key press issue hasn't been showing up as of late for over a week. During that time frame, I have kept my ubuntu up to date, so I presume one of the patches probably nailed it? – Antony Dec 06 '11 at 20:24

7 Answers7

22

Go to system settings >> keyboard and make sure that repeat and speed are set correctly.

when this doesn't work, it sometimes helps to disable repeat keys and enable it again.

R. Oosterholt
  • 536
  • 5
  • 11
21

The xset utility can be used to enable keyboard repeat. It works on the X.org level, so should override whatever the distribution is doing wrong.

To enable keyboard repeat, execute:

xset r on

For details, see man xset.

tanius
  • 6,303
  • 1
  • 39
  • 49
11

I installed xkbset and with the xkbset repeatkeys command it is now working.

I am using Ubuntu 12.04

safavieh
  • 111
  • You shouldn't have to install anything fancy. See R. Oosterholt's answer below. That should be the top answer, not this one. – user1271772 Jan 17 '18 at 07:12
1

I had the same problem as you, but I run a VM with VMware 8.0. After a while the keys would no repeat. What I discovered was I needed to disable "Grab when cursor enters window" from within the input preferences section (Edit -> Preferences -> Input). After that change I have not experienced my keyboard no repeating a keystroke if I hold it down.

1

For more recent versions of Ubuntu like 16.04 and 17.10, there seems to be a different problem with repeating keys not working.

If you run xev and see a steady stream of key events with key code 221, it's probably because of a problem with the peaq_wmi module. You can blacklist it:

sudo su
echo "blacklist peaq_wmi" >> /etc/modprobe.d/50-blacklist.conf

Then reboot your machine.

The bug is marked as fixed, so a patch will presumably come out soon.

Don Kirkby
  • 1,457
  • Your link is an Open Suse bug first reported in September 2017 and marked as fixed already. I wonder how relevant it is in Ubuntuland. – WinEunuuchs2Unix Jan 15 '18 at 02:37
  • @WinEunuuchs2Unix, I just ran into the problem this week in an up-to-date Ubuntu 16.04, and this answer describes it in Kubuntu 17.10 and Ubuntu 17.10 back in October. – Don Kirkby Jan 15 '18 at 02:52
  • I wonder if it's at all related to this update that broke things last week: https://askubuntu.com/questions/995819/touchpad-gestures-and-holding-keys-does-not-work/995948#995948 – WinEunuuchs2Unix Jan 15 '18 at 02:54
  • Yes, @WinEunuuchs2Unix, it looks like it's described in this question. The Open Suse bug also mentioned kernel 4.13. – Don Kirkby Jan 15 '18 at 03:42
  • I answered that question and since I have no problems with Kernel 4.14.13 and touchpad I'm interested if it fixes the problem for others without blacklisting. If not there are lots of question links in my answer you can post your solution on. – WinEunuuchs2Unix Jan 15 '18 at 03:45
0

You can "re-update" the value of the keyboard/repeat option in your config, which is located in /home/ubuntu/.config/dconf/user by default.

Assuming you're updating your default config, you can do that through:

dconf write /org/gnome/desktop/peripherals/keyboard/repeat true

This fixes the random misbehavior of Ubuntu which stops responding randomly(after hibernation/suspension in my case) when keeping the key pressed even though it's already ON(set to true). This the same as updating it through unity-control-center, but with this you can schedule it or run it as needed in a convenient way. Tested on Ubuntu 18.04 LTS.

0

I had the same problem in ubuntu 17.1 I solved the problem from Sitting->Universal Access and I reduced the "Delay" and "Speed" of "Repeat Keys"

Now the Repeat keys look like this and it works well