Please excuse me for sending an Xfree86 related question to this list.
On a US keyboard I'm trying to generate the norwegian characters "ae", "oslash" and "aring". I would like the following mapping
<Alt> + [ --> "ae" <Alt> + | --> "oslash" <Alt> + ] --> "aring"
It doesn't necessarily have to be the <Alt> key, however, any sesible two-key combination will do.
I have managed to map the norwegian characters to the []\ keys by running a script
xmodmap -e 'keysym bracketleft = ae AE bracketleft braceleft' xmodmap -e 'keysym bracketright = aring Aring bracketright braceright' xmodmap -e 'keysym backslash = oslash Ooblique backslash bar'
and then map the keys back to normal by running
xmodmap -e 'keysym bracketleft = bracketleft braceleft ae AE' xmodmap -e 'keysym bracketright = bracketright braceright aring Aring' xmodmap -e 'keysym backslash = backslash bar oslash Ooblique'
This works allright but is a rather primitive solution, as I have to run the script each time I want to change the mappings. Can anyone help me out?
æ Æ ø Ø å Å? Use the compose key.[aka multi-key] 'xmodmap -pk | grep multi-key' to see if you already have one, otherwise you are going to have to map a key to it[which may turn out to be just as ugly as your current solution]. I just have a .xmodmap file[ie commands between the 's, one per line] in my home directory which I just source with 'xmodmap ~/.xmodmap' in my .bashrc which works since I always start up at least one bash shell when I start up X. Other possible places include .xsession, or in /etc/X11/Xsession.d/, but you'll have to figure out which ones are read in your setup which can be somewhat confusing.
æ = Compose[held down] a+e Æ = Shift+Compose[held down] a+e ø = Compose[held down] o+/
You get the idea, though I guess these are technically three key combinations.
pgp00000.pgp
Description: PGP signature