I was trying to make my keyboard more useful and used xmodmap to map mathematical and greek symbols to mod3 modifier level. Where caps lock is mapped to mod3. As I understand, the 8-entry lines in .Xmodmap work as following:
[nothing], [shift], [mod3], [mod3+shift], [altgr], [altgr+shift], [altgr+mod3], [altgr+shift+mod3]
I used this and it mostly worked. Except for some strange occurences. For instance:
keycode 49 = backslash bar includes includedin infinity infinity EuroSign EuroSign This produces the first four entries nicely, but then it cycles around (altgr+key=backshlash, not infinity). However, if I do
keycode 10 = backslash bar includes includedin infinity infinity EuroSign EuroSign it produces first four entries and infinities, but the euro sign doesn't show (I get includes and includedin instead). Notice that I just used a different key, everything else is the same! Even with only 6 entries (in case there was a parsing problem with 8), infinities are not shown on that particular key.
Furthermore, I mapped greek letters to 3rd and 4th entries (mod3 and mod3+shift). The lowercase work fine, but the uppercase doesn't work for Shift+mod3+S and Shift+mod3+W and Shift+mod3+X. It's not a font problem, xev doesn't show any event when I use these combinations.
The entry is
keycode 39 = s S Greek_sigma Greek_SIGMA integral integral downarrow downarrow Additionally, the last two entries mostly don't work.
Even worse, one line gets particularly confused. I entered
keycode 51 = zcaron Zcaron zcaron Zcaron dstroke Dstroke dstroke Dstroke but when I do xmodmap -pke I get
keycode 51 = zcaron Zcaron zcaron Zcaron dstroke Dstroke dstroke Dstroke zcaron Zcaron dstroke Dstroke zcaron Zcaron dstroke Dstroke Notice it duplicated all the entries. A couple of keys do that, but not all of them!
So, my questions are:
- Am I using the 8-entry lines correctly?
- Why do I get different number of working keysyms on different keycodes?
- Is it possible that something in the window manager maps these combinations and swallows them?
- Why are some lines getting duplicated when they are applied?
- Is this an obscure xlib bug?
- Is the modifier functionality limited?
Note that I'm in a unique situation where there simply can't be any unknown shortcuts that I don't know about because my window manager is of my own making and I control all of them.
More details: the mapping of caps lock is done like this:
keycode 66 = Mode_switch clear lock clear control clear mod1 clear mod2 clear mod3 clear mod4 clear mod5 add control = Control_L Control_R add mod1 = Alt_L Meta_L add mod2 = Num_Lock add mod3 = Mode_switch add mod4 = Super_L Super_R Hyper_L add mod5 = ISO_Level3_Shift The system is a freshly updated arch linux.
Edit: I found out that a small part of the problem (the SWX that didn't work at all) was due to the adjacency of the keys on the keyboard (key jamming, couldn't handle 3 concurrently pressed keys in this combination). Right shift removed the problem for W and X but not for S (on this particular keyboard).
The rest is still a mystery, particularly the broken 5th and 6th entry for keycode 49 (the totally useless thingy above the tab).