Tuesday, March 13, 2012

Xorg tty switching is wrong

I found this issue (literally about 10 minutes ago) on my PC after a recent update. Basically, in any tty screens switching was the normal ctrl+alt+Fx setup, but the moment I tried to do the same from my xserver, I wasn't able to do so. For some reason, the keyboard shortcut from X was shift + Fx, which is a keybinding often used by other programs (Blender, for example). After a bit of looking (and googling, though I didn't find much in the way of concise answers), I found out that it was due to my .Xmodmap file I was using. For whatever reason, the entries for my F1-F12 keys were totally messed up. A bit of trial and error didn't let me figure out the correct entries, so I simply reset my keyboard (setxkbmap de), and then found the entry (xmodmap -pke|grep VT). Turns out that the entries should look as follows:

keycode 67 = F1 F1 F1 F1 F1 F1 XF86Switch_VT_1
I figured I should document this here, in case anyone else has a similar issue (or if I have the issue again...). For anyone too lazy to count, that is 6 F1's, and on the 7th entry, you write XF86Switch_VT_1 (or replace F1 and VT_1 with whatever Fx key you're working on). Once you've updated your .Xmodmap file, simply reload it with xmodmap ~/.Xmodmap (you may need to change the path if you're using a different one).

1 comment:

Anonymous said...

I'm having the same problem, and your post completely solved it. Thanks!