Bug 155951 - keystrokes are dissappearing: focus seems to be stolen
Summary: keystrokes are dissappearing: focus seems to be stolen
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: CVS
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-16 22:33 UTC by Jos van den Oever
Modified: 2012-03-12 02:49 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jos van den Oever 2008-01-16 22:33:24 UTC
Version:           unknown (using 4.00.80 (KDE 4.0.80 >= 20080104), compiled sources)
Compiler:          gcc
OS:                Linux (x86_64) release 2.6.22-14-generic

This is an difficult bug. When using KDE4 in KWin (the kde4 version), the keyboard sometimes stops responding. After switching back and forward between different applications long enough I can usually get it back. However, I've not found out what I need to do to get focus back.

The keyboard seems to stop working after some focus changes between applications.

I run KDE4 over NX. Maybe this is related.

Sorry if this bug report is not very detailed. It's annoying and frequent enough (every 5 minutes) to warrant a report.
Comment 1 Jos van den Oever 2008-01-16 22:43:05 UTC
Here's some more information.
I can get back a working keyboard by right-clicking on a window title.
The keyboard almost always stops working after using alt-tab to switch applications. When using the mouse to switch, this does not happen.

Comment 2 Jos van den Oever 2008-01-16 22:50:03 UTC
To add some more info: Alt-F3 or any other kwin keystroke does not work either when the keyboard stops working.

Comment 3 Jos van den Oever 2008-03-24 13:13:27 UTC
In the current trunk version this problem still exists.
When using alt-tab to switch windows, the keyboard can stop working. This happens about 1 in 5 of every time alt-tab is used.
When the keyboard stops working, one can get it working again by right-clicking on a window title bar and moving the mouse over the context menu. There is no need to click on an entry, just moving the mouse over a context menu makes the keyboard work again.

This was observed by running kde4 over an nxclient.

Marking this bug as 'major' because a normal user would really panic if the keyboard for the entire desktop would stop working.
Comment 4 Mike M 2008-04-10 21:32:53 UTC
I'm seeing exactly this behavior, myself, on KDE 3.5.8 (with Qt 3.3.7).  Fairly fresh kubuntu install, and I'm running over NX as well.  (Windows nxclient -> Kubuntu nxserver).

It happens pretty often switching desktops, which I have bound to CTRL+F1, CTRL+F2, etc.  Switch back and forth quickly, and the keyboard will stop working.  'xev' reports NO keyboard events, no matter what keys I hit.  The mouse and everything else continues working normally.  I finally figured out it was a KDE issue by killing 'kwin' and recovering my keyboard.  Sometimes it comes back on its own after about 20 minutes of fiddling.  I'll have to try the title bar right-click method next time this happens.
Comment 5 Mike M 2008-04-10 22:37:28 UTC
Followup: Just happened again, and right clicking the title bar worked like a charm.  THANK YOU for posting that workaround.  That's going to save me a LOT of frustration.
Comment 6 James 2008-08-14 05:18:31 UTC
I can also confirm this bug.  It's very annoying, but thank god for that workaround.
Comment 7 Nikolay_Miroshnichenko 2009-01-11 21:31:28 UTC
It's been happening very often. I'm a user of Konqueror 4.1.3 (KDE 4.1.3).
It's very annoying (so that I dare to add my comment), although I rarely get annoyed with bugs. It is really serious, please keep attention to it. I couldn't find the exact steps to reproduce it, but it occurred often after opening a new page retyping a url in the address field. It seems to help if changing the size of the window twice but it's a very bad problem, I think.
(By the way, I am currently on GNOME, although I don't think it matters but who knows).
If somebody asks I'll test this issue more thoroughly to find out ways of reproducing it.
Comment 8 Gerry Gavigan 2009-01-11 23:24:28 UTC
I stumbled over this one and voted for this bug a while ago. 

Whether or not it's the same situation, my problem turned out to be KDE responding to me having depressed a key for too long a period of time.  It decided I had a usability issue and rather than give me multiple responses to one keystroke it increased the delay time before giving me a "letter".

Have you tried resetting the keystroke time in usability settings?

Just a thought, might be drivel  
Comment 9 Chris Dunning 2009-05-07 18:19:01 UTC
I'm seeing this same problem.  Symptoms:

-keypresses don't work in the current session, except for Alt+F1 to switch sessions.
-using Alt+F1 to jump to a command line works, I can log in on the command line and use the keyboard with no problem.
-Using the mouse, I can open a parallel session and the keyboard works within the new session.  I can then switch back and forth using Alt+F7 and Alt+F8.

I can't pinpoint a cause.  I've been working this morning using my laptop and have seen it twice in the last 4 hours.  The first time it happened I was in the middle of working, hit Alt+Tab to switch windows and got no response.  I rebooted the laptop at that time and found this bug report on my other computer while I was waiting.  Just now I left for a coffee break, it was working fine when I left, when I came back to my desk I had no keyboard response.  I tried the suggestion from:

Comment #1 From  Jos van den Oever   2008-01-16 22:43:05

Right-clicking on a title bar fixed it.  Jos, I have no idea how you figured that out, but thanks!

I see that this bug has been open since 1/08 but I first noticed the problem only a few weeks ago (sometime in 4/09).  So far it has only surfaced on my laptop (Thinkpad R40 circa 2003).  I have in the house various other laptops and desktops, some older some newer, running various versions of Kubuntu.  Only this particular laptop has had a problem so far.  When I first noticed it I was running Kubuntu 8.10.  I have since upgraded to 9.04 and still have the same problem.

Something else that might be helpful:
I frequently use Synergy, which allows me to connect my laptop to my desktop's mouse and keyboard.  When this bug shows up I'm still able to control the mouse using Synergy, but the keyboard is unresponsive whether I try the desktop's keyboard or the laptop's built-in keyboard.  I've seen this happen both with and without Synergy running.

If I can be of help please let me know - I wouldn't be any help coding but I'm happy to test as needed.
Comment 10 Christoph Lange 2009-11-13 17:22:17 UTC
The symptoms of this bug seem similar to bug 171685.  Maybe the two bugs should be merged.  At least I'd recommend that you also vote for that other bug, as it is currently ranking higher.
Comment 11 John Tapsell 2009-11-16 13:37:07 UTC
I also get this problem, and right clicking on a title bar fixes it.  Thank you so much for that suggestion!

I get this in KDE 4.3.2, on a laptop, not using FreeNX or anything.
Comment 12 Martin Flöser 2011-05-04 17:27:42 UTC
is this still an issue?
Comment 13 Jos van den Oever 2011-05-04 20:47:00 UTC
I have not used KDE over NX for a long time and hence have not experienced the bug for a long time. I do not know if it is fixed. I am not using windows anymore and have no need for NX and no system at hand to test the bug. If one of the other reporters, is still experiencing this bug, please confirm it.
Comment 14 Thomas Lübking 2012-03-12 02:49:25 UTC
Since the last report is from 4.3, there is another bug confirmed to have disappeared, the thing would be incredibly nasty and should cause more reports and reports here have started and stopped around bug 171685 start and stop times, i'll tag this "worksforme"

If somebody reproducibly looses his/her keyboard, please file a bug ;-)