N900 Scandinavic Letters from US keyboard
My Nokia N900 has the US keyboard with four arrow keys but no diacritics, two of which are used in my native Finnish language. I actually like having the four arrow keys instead of two arrow keys plus dedicated diacritics. You can anyway get those from the on-screen keyboard, but it is better to remap some of the hardware keys to be able to punch them in quicker. Here’s how.
To change the default hardware keyboard mapping, edit file /usr/share/X11/xkb/symbols/nokia_vndr/rx-51. This file describes the mapping from hardware keys to symbols on screen. You can change them how you like, but most of the keys are already mapped with symbols even with the modifier keys (Ctrl, Alt/Fn, Shift), and the corresponding symbol is printed in the hw button. So changing those might not be a good idea. However, the arrow keys on the US keyboard are free to use with the Alt/Fn modifier (the blue northeast pointing arrow on the left side of the keyboard). The arrow keys with the shift modifier key are used to select text, though, so they are not to be messed up.
The last stanza in the file is the arrows_4btns, which can be edited to provide more symbols directly from the keyboard. My configuration adds four important (to me) symbols: the letters ‘ä’ and ‘ö’ which are used in the Finnish language, and the vertical bar, or pipe symbol ‘|’, and tab key for speedier xterm usage. The capital versions, ‘Ä’ and ‘Ö’, can not be inserted using this configuration, so you will still need the on-screen keyboard for those. Luckily they are quite rare.
With my configuration, you can get these additional symbols:
- Fn+Up: ‘|’
- Fn+Left: ‘ö’
- Fn+Down: ‘ä’
- Fn+Right: Tab key
I don’t need the Swedish ‘å’ key that much myself but if you need it, you can put “aring” instead of Tab on the right arrow key.
# vi /usr/share/X11/xkb/symbols/nokia_vndr/rx-51
So let’s comment out the default mappings and add our own mappings:
xkb_symbols "arrows_4btns" {
// standard arrows mapping
// normal 2nd level must not be enumerated to allow text selection with Shift key
// key <UP> { type[Group1] = "ONE_LEVEL", symbols[Group1] = [ Up ] };
// key <LEFT> { type[Group1] = "ONE_LEVEL", symbols[Group1] = [ Left ] };
// key <DOWN> { type[Group1] = "ONE_LEVEL", symbols[Group1] = [ Down ] };
// key <RGHT> { type[Group1] = "ONE_LEVEL", symbols[Group1] = [ Right ] };
key <UP> { type[Group1] = "PC_FN_LEVEL2", symbols[Group1] = [ Up, bar ] };
key <LEFT> { type[Group1] = "PC_FN_LEVEL2", symbols[Group1] = [ Left, odiaeresis] };
key <DOWN> { type[Group1] = "PC_FN_LEVEL2", symbols[Group1] = [ Down, adiaeresis] };
key <RGHT> { type[Group1] = "PC_FN_LEVEL2", symbols[Group1] = [ Right, Tab ] };
};
To reload the configuration, run “setxkbmap us” in xterm.
Links:





