How to get "< >" keys on a Thinkpad T60 with german keyboard layout?
- Inicie sesión o regístrese para enviar comentarios
Hello everybody,
i bought a cheap Thinkpad T60 and installed Trisquel on it. Some things don't work but I don't mind.
The one thing which bothers me is that the notebook has a US keyboard with a long "shift" key.
On a german keyboard, the shift key is only twice as long and instead there is an additional key, containing "<", ">" and "|", and since this key is missing here I'm not able to type any of those characters as long as I use a german keyboard layout (which is a real problem if you want to write code or use the bash).
I don't use any GUI but instead the awesome window manager, so solutions that don't include preference-tools of some DE are prefered.
I already opened /usr/share/X11/xkb/symbols/de
and replaced "acute" with "lesserthanequal" and "grave" with "greaterthanequal" since I don't need neither of those keys, but first of all, those are not the names for < and > (how are they actually called?) and second, it didn't work!
Even after reboot I still get ´ and ` instead of < and >.
Does anybody know more about this topic? It's very tedious and time consuming digging in those config files.
I'm guessing there are a lot of German keyboard layouts to choose from and that you should try them one by one?
"<" is "less"; ">" is "greater"; "|" is "bar".
Instead of messing with xkb you can use xmodmap. You first need to dump the current mapping of the keys into ~/.Xmodmap:
$ xmodmap -pke > ~/.Xmodmap
Then you must modify this file. In the first column, you have the key code (bound to a physical key) and then, after the equal sign, what character it represents (first when the key is pressed without any modifier, then when Shift is pressed at the time, etc.).
You can use the 'xev' command to discover what key code is bound to a particular key. For a clearer out, you can filter the lines with "keycode":
$ xev | grep keycode
When the command is running, just press the key to discover its code.
With GNOME, I then had to explicitly add 'xmodmap ~/.Xmodmap' to the "Startup applications". I believe you will not have this trouble with awesome.
Thank you all for your helpful replies!
There was no german keyboard layout which allowed me to use the keys I needed so I went with the proposal of MagicBanana. I wasn't aware of xmodmap and it really worked, at least for the < > keys. I tried to make 'bar' accessable by the same key just with AltGr, but by now i didn't succeed. Anyway, I will figure that one out when i have a bit more time.
I want to add (for other people who have the same problem) that it's of course neccessary to run
"xmodmap ~/.Xmodmap" at least once after making the changes. But MB was right: with awesome/i3/xmonad, it's sufficient to run the command one time. The changes will still persist after reboot.
- Inicie sesión o regístrese para enviar comentarios