Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Microsoft Ergonomic 4000 keyboard and I am running a custom keymap (dvorak with some stuff for umlauts):

This used to work fine for years and it still does, except that I am now having issues with a stuck Mode_switch key. When I hit Control_R and Mode_switch at the same time (happens a lot by accident), the Mode_switch key gets into a 'stuck' state, all letters I type afterwards come out in their umlaut form as if Mode_switch is pressed. I can unstuck the Mode_switch by again hitting Control_R and Mode_switch at the same time, but that leaves Gnome in a broken state where it doesn't react to my Gnome keyboard shortcuts any longer. The key presses themselves are still registered by the window manager as one can see changes in the applications (cursor in Gnome Terminal will turn into an unfilled rect, as if the application lost focus), but don't trigger the bound action.

Does anybody have a clue what could be causing this? Or does anybody has an idea how I could debug this?

xev doesn't seem to help here, as it is reporting normal KeyPress/KeyRelease events, even when the key is stuck. Also the Gnome key bindings don't get reported at all when its in the 'broken' state. I assume they are captured by the window manager before they even reach xev.

I am using Ubuntu 10.04 with Gnome and Metacity, I have disabled all OpenGL related effects, so Compiz shouldn't interfere.

Some general info on which applications are involved in Gnomes key binding handling would be helpful as well, as I assume its metacity, but restarting metacity doesn't fix the issue.

share|improve this question

Similar problems are experienced by other people (including me); see (doesn't include a solution but confirms that it's not just hardware).

share|improve this answer
At the end the post proposed setxkbmap -layout us... – Hastur Sep 30 '15 at 14:47

I found this workaround:

$ setxkbmap -layout us

Read for more details.

share|improve this answer

As you say this keyboard has served fine for years, this looks more like a hardware problem.

It's possible that some dirt got under the key and causes it to stick.
Some simple cleaning might in this case solve the problem.

You might also try first another keyboard (if one is available) to verify that it's indeed the keyboard that is the problem.

share|improve this answer
xev reports keyPress/keyRelease perfectly fine, so the stuck happens in the software not in hardware. – Grumbel May 29 '10 at 16:48
@Grumbel: Sorry, but I don't have any other ideas. I notice you've been trying to get help on quite a few forums, without result. This seems to be a problem specific to your computer, so you'll need to investigate some more. I would perhaps still try another keyboard, maybe non-Dvorak, to clearly find out whether this is software or hardware. – harrymc May 29 '10 at 17:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .