Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have strange bug. Sometimes after pressing any key on my keyboard while working in unity programs does not receives the event of pressing but in plain terminal(ctrl+alt+f1) keyboard works just well. Please tell me if somebody solve that problem?

It looks like if I quick press one key several times only first press works, but if I press the same key with time interval of one second so it works normally.

share|improve this question
    
It is a bit difficult to say what is going on from the information you've given. Is there any particular key you might have pressed immediately prior to the applications not receiving keyboard input? Unity will trap the Win key, if that makes a difference. –  James Henstridge Oct 17 '11 at 8:11
    
It looks like if I quick press one key several times so only first press works, but if I press the same key with time interval of one second so it works normally. –  Ilay Oct 17 '11 at 8:13
    
Any single key has that problem in my case –  Ilay Oct 17 '11 at 8:14
    
I checked the xev utility output and I can see that x server receives only first key press event if I start to press same key many times with short time interval. –  Ilay Oct 17 '11 at 8:25
    
I wrote simple program for capture events from standard input device(/dev/input/event5 in my case) and in that part all presses notifies as it should –  Ilay Oct 17 '11 at 9:00

9 Answers 9

up vote 5 down vote accepted

It sounds like you have the Bounce Keys accessibility feature turned on. This is intended to help people who have trouble using the keyboard without producing unwanted duplicate key presses, but is obviously not something you want or expect.

You probably enabled it accidentally via a special keyboard shortcut that I can't remember. It can be disabled through the following steps:

  1. Open the Universal Access control panel in System Settings.
  2. Switch to the Typing tab.
  3. Make sure the toggle under Bounce Keys is turned off.
share|improve this answer

I think it could be a bug. I'm having the same issue, all switches are enabled but randomly "repeated keys" stop working. There is also a question issued about the topic in ubuntu launchpad :

https://answers.launchpad.net/ubuntu/+source/xserver-xorg-input-keyboard/+question/175128

Expanding on the reply to this thread: the problem is not 'bouncy keys'. I've had accessibility completely off-always- and have been able to replicate the poster's problem. It's actually a random ignoring /failure of the enabled keyboard repeating setting in gnome. Turning off and back on the keyboard repeat setting in gnome seems to have fixed the problems for me. But again, it's a temporary fix: the problem will happen again and it gets me very upset. So I created this simple bash file, and pinned it as a custom launcher. Then I thought, why not put it as a cron job to run every minute. This has fixed the problem for me.

#!/bin/bash
# resets key repeat, a bug in unity
gconftool-2 --type bool --set /desktop/gnome/peripherals/keyboard/repeat false
gconftool-2 --type bool --set /desktop/gnome/peripherals/keyboard/repeat true
share|improve this answer

The fix mentioned by James Henstridge will fix the issue.

However, if you are on the settings dialog mentioned, the bounce keys option was off. When I turned it to 'on' and then switched it 'off' again, my keyboard started working as expected. I think this is a bug in the way the defaults are set up.

share|improve this answer
    
Mine was similar to this but toggling Bounce Keys on/off didn't do it. I had to enter the "Keyboard Settings" area and just move the sliders around, then my type repeat worked. –  Cluster Nov 26 '11 at 19:14

I am experience the same issue of losing repeated keys if key is pressed and the workaround I do is open keyboard application; uncheck and check "key presses repeated when ...." option; it will start working again for some hours/time.

So I pinned that keyboard application to my bar and just do this uncheck and check thing whenever face this issue.

I am pretty sure that its a bug in unity.

share|improve this answer

I am experiencing this as well. (Ubuntu 11.10, FF 7.01, Intel GMA4700, etc.)

I am getting loss of keyboard-focus, particularly in FF 7.0.1, when I have two or more browser windows open, and use unity launcher to change focus (eg. to email, to Nautilus, and then back to browser.)

(First experienced today.)

I first resolved by fiddling (eg. select an alternate search), but then it happened again and I resolved it by closing ALL browser instances.

Best guess: it is associating the wrong app./focus with current (and therefore the keyboard).

(not easily repeatable, so still studing the issue)

share|improve this answer
    
This sounds like a different problem to what the reporter has encountered (see the comments on the question). Rather than being related to focus, it was to do with some keystrokes being lost. Perhaps you'd be better off asking this as a separate question? –  James Henstridge Oct 17 '11 at 11:07

Continuing James list: 4. Click on keyboard settings button from the bottom of the right hand side 5. Make sure that "Key presses repeat when key is held down" is checked.

share|improve this answer

In Unity, keyboard repeat by holding down a key stops working randomly it seems. When I go to keyboard settings, I find that "Key presses repeat when key is held down" is checked even though it acts as if it's not. However, if I uncheck and recheck, then the repeat feature works again. Unfortunately, I have to do this several times a day.

share|improve this answer
    
same here. Bounce Keys is not activated. However I have VMWare and a Windows Guest, and repeated keys works in the Guest while it is not working in the Host. –  karatedog Oct 25 '11 at 10:46
    
Tested with xev, it does not receive a KeyRelease event, only KeyPress. –  karatedog Oct 25 '11 at 11:04

I thought it might be Bounce Keys too, but it's not. All the features in the Typing tab are off. I'm thinking this is a bug.

share|improve this answer

I did this: Open the Universal Access control panel in System Settings. Switch to the Typing tab. Make sure the toggle under Bounce Keys is turned off. (By turning off and the on again).

share|improve this answer

protected by RolandiXor Nov 14 '11 at 14:36

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.