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.