Mailing List Archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tlug] Weird xmodmap problem

Here's a weird one for the group...

For various reasons I have recently decided to switch from Slackware to
Ubuntu (9.10 Karmic Koala). Yes, it's a bit of a culture shock, but globally
somewhat positive so far. I've only come across one problem that's stumped
me, so here goes.

My keyboard has a UK layout, but since I regularly use several European
languages that require accents on some letters, I use a certain amount of
xmodmap voodoo to get those accented letters like à, é, î, ô and ù on keys
accessible via the right-alt (Mod5) key, and the usual deadkeys such as `, "
and ' are no longer deadkeys since I use them often enough for it to be a
real pain in the arse to have to type a space after them for them to
display. Thus, I can get the 'ù' using either the traditional "compose"
sequence of shift+Mod5 followed by ` and then u, or I can get it a hell of
a lot quicker by simply keying in Mod5+u, but not by using the old deadkey
sequence of ` followed by u.

I have a rather large ~/.xmodmap file that's loaded in when X starts. All
the expressions in this .xmodmap file are executed bar two of them. X seems
to be accepting, yet ignoring the redefinition of the 'n' and 'e' keys.

If I run:

$ xmodmap -e "keycode 0x19 = w W w W eacute egrave"

then from that point onwards, Mod5+w gets me 'é' and Mod5+shift+w gets me
'è'. All is fine, 'eacute' and 'egrave' are recognized as symbols.

If I now run:

$ xmodmap -e 'keycode 0x1A = e E e E eacute egrave"

then Mod5+e does NOT get me 'é' and Mod5+shift+e does NOT get me 'è'. I
just get 'e' and 'E' respectively (the €uro symbol is on the '4' key, not
the 'e' key on UK keyboards). Yet:

$ xmodmap -pke | grep 'keycode  26'
keycode  26 = e E e E eacute egrave

so X has taken the map into account but somehow is not giving me the right
symbols when I press on the keys.

If I run:

$ xmodmap -e 'keycode 0x1A = e eacute"

and now press shift+e, I *do* get 'é'.

Similarly, the 'n' key is displaying the same oddity:

$ xmodmap -e 'keycode 0x39 = n N n N ntilde Ntilde'

Then, Mod5+n *should* get me a 'ñ' and Mod5+shift+n *should* get me a 'Ñ',
but they don't, I just get 'n' and 'N' respectively. Yet:

$ xmodmap -pke | grep 'keycode  57'
keycode  57 = n N n N ntilde Ntilde

So, to recap, X is aware of the changes I've made to the mapping since
they're displayed in the output of 'xmodmap -pke'.

The 'Mod5+' key combos all work with the exception of those associated with
the 'e' and 'n' keys.

I have looked in gconf-edit and there are no keyboard shortcuts defined
that use either Mod5+e, Mod5+shift+e, Mod5+n or Mod5+shift+n.

The environment variable GTK_IM_MODULE is set to "xim".

A search on the net basically turned up only info on how to map the right
alt key to the left one, which I don't want to do.

A post I made about this on the Ubuntu forums a few days ago remains


G. Stewart -

I don't approve of political jokes... I've seen too many of them get 

Attachment: pgp7kpxjq7xbL.pgp
Description: PGP signature

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links