Typing Fadas on Linux
If you have a European keyboard, you should be able to type fadas simply by holding down the Alt Gr key, pressing one of the vowel keys, and then releasing both keys. To get an uppercase vowel with a fada, simply use shift + Alt Gr + vowel.p>
If you do not have a European keyboard or an Alt Gr key, you can type fadas by modifying your keyboard map. In this example, we are going to map the Alt Gr capability to the right Alt key. You can modify the procedure to use any key you want, of course.p>
Step 1: Figure out what the keycode is for the key you want to map.
xev app is useful here. Start it up, and press the key you want to check. (Be aware that moving the mouse while
xev is active will generate output too, and might cause the information you're interested to scroll off the screen.) When you type the right Alt key, you might see output that includes the following:
KeyPress event, serial 30, synthetic NO, window 0x3600001, root 0xb6, subw 0x0, time 1093754603, (346,389), root:(349,418), state 0x0, keycode 113 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False KeyRelease event, serial 30, synthetic NO, window 0x3600001, root 0xb6, subw 0x0, time 1093754672, (346,389), root:(349,418), state 0x80, keycode 113 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES, XLookupString gives 0 bytes:
Now we know that the keycode for the right Alt key is 113. Kill
xev by clicking on the close ("x") button in the upper right. (Ctrl-x won't kill this app, because it just gets trapped and reported along with any other key event.)
Step 2: Experiment with a new key mapping.
In a command shell, type:
xmodmap -e "keysym 113 = ISO_Level3_Shift"
Now try it out. Hold down the right Alt key, press the a key, and then release both keys. You should see á. To get an uppercase Á, type shift + right alt + a. Try the other vowels as well.
Note: You could simply add the xmodmap command above to your .bashrc file (or .cshrc, etc.), and the key mapping will be available every time you log in. (If you decide to do that, don't follow the remaining steps.) But wouldn't it be nice to have a complete keyboard mapping that you can take with you so that any Unix machine you use will have all your favourite key mappings?
Step 3: Dump your current keyboard assignments.
cd ~ mv .xmodmaprc .xmodmaprc.OLD xmodmap -pm > .xmodmaprc xmodmap -pke >> .xmodmaprc
Step 4: Ensure that your keyboard assignments are loaded each time you log in.
Your .bashrc file (or .cshrc, etc.) file should contain a line similar to the following:
Or you could use this version, which will use your key mappings only if the .xmodmaprc file is present.