Why there is a delay between when a key is pressed and when it is accepted?

This is one of the wackiest and weirdest problems I have ever encountered. My keyboard was working absolutely fine untill yesterday on Ubuntu 13.04. However, when I boot to Ubuntu today, I suddenly find that all the keys work, but I have to press and keep on holding them for about a second for them to work.

  • This behavior is true for all the keys except for Num Lock, Caps Lock and Scroll Lock keys, the indicator for them on my keyboard lights up as soon as I press those keys.

  • The keyboard works fine at the login screen where I put my password.

  • The keyboard also works normally if I use the Guest session instead of my normal user account.

  • I have not done any key-remappings and using the standard English (US) keyboard layout.

  • I have fiddled around with the settings for Keyboard in System Settings, but to no avail.

  • I have Windows 7 as dual-boot and the keyboard works perfectly well on it.

Why am I facing such a behavior and how to normalize this?

PS: Using Logitech Classic Keyboard K100 (USB Model).


Solution 1:

Because probably you put on the Slow Keys option from System SettingsUniversal AccessTyping. Turn it off:

slow keys

Solution 2:

I had a similar problem. I stumbled on the answer while trying the solution here. Somehow the screen reader was turned on and was causing erratic behaviour. Check it under System Settings → Universal Access → Seeing. Make sure Screen Reader is set to OFF. Screen Reader OFF

Solution 3:

Ubuntu has apparently mirrored the "slow keys" functionality in Windows, and by default set this up so it's enabled by holding down Shift key for too long automatically turns on this setting!

The appearance of this setting in recent years has been driving many people nuts, and the habit of holding down Shift while thinking of what to type means that it's easy to turn on this setting by accident.

The accepted answer does not work anymore in latest version of Ubuntu, there is no "Slow Keys" option anymore in gnome-control-center.

The only way I've found to reliably disable this is via command line:

# Get current value of keyboard accessibility (enabled = true , disabled = false)
gsettings get org.gnome.desktop.a11y.keyboard enable
# Get current value of slowkeys-enable
gsettings get org.gnome.desktop.a11y.keyboard slowkeys-enable
# Turn it off!
gsettings set org.gnome.desktop.a11y.keyboard slowkeys-enable false

# Get current value of stickykey-enable
gsettings get org.gnome.desktop.a11y.keyboard stickykeys-enable
# Turn it off!
gsettings set org.gnome.desktop.a11y.keyboard stickykeys-enable false
# Finally, turn the entire keyboard accessibility options off (this should disable the SHIFT key shortcuts)
gsettings get org.gnome.desktop.a11y.keyboard enable false