# 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).

-

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

-
I didn't think about that one... or more like, I totally forgot that there was one like that. –  Braiam Oct 4 '13 at 21:03
@Braiam I can bet that many of us doesn't have idea about these features from Universal Access. –  Radu Rădeanu Oct 4 '13 at 21:09
I can't confirm if this was the issue. I had already started following @Braiam's answer and deleted the 3 . folders before you posted this one... –  Aditya Oct 4 '13 at 21:17
@Aditya If you made backups as Braiam said, you can restore them and check :) –  Radu Rădeanu Oct 4 '13 at 21:20
@Aditya Ok, I'm sure this was the problem. Since Braiam's answer solved your problem, the same answer may offer some other "fixes", like losing some settings... But from now you know how to put a delay between when a key is pressed and when it is accepted :) –  Radu Rădeanu Oct 4 '13 at 21:33

This could happen when there is a daemon program catching keystrokes (like onboard). As a trial, open gnome-system-monitorand look if there is any bash script or even python scripts running. Try closing onboard if it's running.

-
I don't find any process called onboard or other bash/python scripts running. –  Aditya Oct 4 '13 at 18:28
@Aditya Do you have compiz installed? If so check there... Have you tried a defirent keyboard? Have you been using ununtu fine for awhile or did you just install it? –  SoCalDiegoRob Oct 4 '13 at 20:37

I can not post a proper answer with images and all cause I am on a windows only public computer right now but, try going to the keyboard settings and check to see if there is a key sensitivity setting, then maybe you can adjust it there...also try unplugging keyboard and then plugging it back in. Maybe this will reset it... Just suggestions!

Hope it helps... Good Luck!

-

I know that what I will recommend is almost the most easy and ugly solution out there:

Move the .* directories to somewhere else:

mkdir ~/backup
mv ~/.config ~/.dbus ~/.gconf ~/backup/


now restart your session. The problem should have go away. If the issue goes away, you can restore back one by one the innocent with

cp -nr ~/backup/.dbus ~/.dbus


Restart the session, issue is there again? Remove the directory and copy instead one by one the contents of the subdirectories. Same with the other 2 directories.

cp -nr ~/backup/.config ~/.config
cp -nr ~/backup/.gconf ~/.gconf


I know is quite brutish the method, but since I couldn't find the exact file/dconf/gconf/xinput that could cause this, a little quick hack should suffice.

-
Then, if I had made any changes to settings in those folders intentionally/unintentionally, they would also go away.. –  Aditya Oct 4 '13 at 20:22
Not necessarily, for that I asked you to move not remove files, check my updated answer. BTW, my method is quite like debugging, since it was a possible update that quirk the configurations, looking for them commenting in your question seems too long and answers should be the more generic as possible. –  Braiam Oct 4 '13 at 20:31
Okay... I used cp -r (without the -n flag) and restored all the 3 . folders... Restarted the system and keyboard is still working fine... However, no setting seems to have been restored - I have lost settings related to wallpaper configuration, unity, date and time settings - the ones which are visible instantly are all lost.. –  Aditya Oct 4 '13 at 21:16
Mm... that's not right. If you used cp -r and copied everything you should have everything there since cp by default replaces the files... something wicked was in your system. BTW, in the first attempt, where the configurations lost too? –  Braiam Oct 5 '13 at 1:26
Braiam: I have been trying to restore the folders all along... but my settings are not getting restored. I would soon post a new question about restoring my settings. Anyways, thanks for your time; however following @Radu's answer would have solved this question :) –  Aditya Oct 5 '13 at 13:44