Special characters with US keyboard.
I'm using a US keyboard layout on my machine, since that's the most hack-friendly one I can actually grok and type blindly on. Often, however I need to type special characters, such as € or letters with a diaresis on top, such as ü (useful to type my own name ;-)). Those should be easy to type for me as well. What I did is to modify my keymap slightly, so that I can use the Right ALT key (ALT Gr on some keyboards), and get the correct character just by typing Right ALT + a for example to get an ä). The 5 key already has € printed on it, so I'm using Right ALT + 5 to type the Euro sign.I've saved the following settings into a file called ~/.Xmodmap-Umlaut and when logging in, I'm just running a small script
#!/bin/sh xmodmap /home/sebas/.Xmodmap.Umlautwhich reads the following file:
keysym u = u U udiaeresis Udiaeresis keysym a = a A adiaeresis Adiaeresis keysym o = o O odiaeresis Odiaeresis keysym e = e E ediaeresis Ediaeresis keysym i = i I idiaeresis Idiaeresis keysym s = s S ssharp keysym 5 = 5 percent EuroSignNow this is probably not the 100% correct way to do it (email me suggestions for improvements :)), but it Gets The Job Done and works ergonomically well enough for me. In case you're getting errors, try replacing ISO_Level3_Shift with whatever "xev" reports as (keysym 0xff7e, Mode_switch) when you capture the Right Alt key with it (or map it to anything you like in the same way).
[ Mon, 15 Jun 2009 10:05:55 +0200 ] permanent link
This weblog does currently not offer the option to comment. I would be happy to receive an email with your thoughts.
23-11-2007, 18:44 h
© Sebastian Kügler