I was using VMware and my keyboard went to Horkytown. My recipe for resetting the keyboard (at least on Fedora 10):
-
egrep -i 'rules|layout|model' /var/log/Xorg.0.log
to find out your rules, layout, and model for your keyboard. -
setxkbmap -rules xorg -layout us -model pc105
substituting the values from step 1 where appropriate.
If you have to SSH in and do this, like I did, prepend DISPLAY=:0
to setkbmap
of course.
Thanks! Just saved me from the same issue!
Thanks – saved me from having to restart X11. I was able to plug in a USB keyboard and follow your advice to restore my normal keyboard.
Thanks! I hope this will solve a long-standing problem that I have with my VNC sessions on Ubuntu — every one in a while, my ALT key gets virtually stuck, and although I can see key events showing the alt key presses and releases, all input continues to behave as if the alt key was down.
[...] I found the answer on this blog post. [...]