Mailing List Archive


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

Re: [tlug] Keyboard mappings



It seems that there is some setting thing called "xmodmap" involved.

You're right.

I did a little remapping when I set up an old imac but it was a while ago.
This is what I did from memory.

You need to use a little utility call xev. Start it from a terminal.
xev grabs x events and gives you info on them. Moving the mouse around produces masses of info so you might want to give the mouse a rest while you check things out.
Press the keys you want to modify and take a note of the keycodes.


Next, make a file in your home directory called .Xmodmap (leading dot)

This file is of the format keycode = key symbol (not sure this terminology is right)

e.g.

keycode  38 = a A kana_CHI
keycode  39 = s S kana_TO
keycode  40 = d D kana_SHI
keycode  41 = f F kana_HA
keycode  42 = g G kana_KI
keycode  43 = h H kana_KU
keycode  44 = j J kana_MA
keycode  45 = k K kana_NO
keycode  46 = l L kana_RI
keycode  47 = semicolon plus kana_RE
keycode  48 = colon asterisk kana_KE
keycode  49 = Zenkaku_Hankaku Kanji

You need to map your special keys to some pseudo key symbol. You might try F13, F14 and F15
i.e.


keycode nn =F13

Then use keyboard shortcuts to set up the desired action.

Somewhere on your system (I forget where) is a file that maps all the keycodes your keyboard produces to the right keysymbols.
There are even special keys symbols. Changing virtual terminals.


keycode  67 = F1 XF86_Switch_VT_1
keycode  68 = F2 XF86_Switch_VT_2
keycode  69 = F3 XF86_Switch_VT_3
keycode  70 = F4 XF86_Switch_VT_4
keycode  71 = F5 XF86_Switch_VT_5
keycode  72 = F6 XF86_Switch_VT_6
keycode  73 = F7 XF86_Switch_VT_7
keycode  74 = F8 XF86_Switch_VT_8
keycode  75 = F9 XF86_Switch_VT_9
keycode  76 = F10 XF86_Switch_VT_10

(I got the above from a backup of the imac's xmodmap file)

This is just a starter and you will might want to do a little more research.

WARNING - Be careful when modifying your keyboard this way. You can operate with only a keyboard but with only a mouse it's a bit harder. Since the modifications appear in you home directory they will overide the system settings. To get back to your original settings just delete the .Xmodmap file.

On the chance that this does happen you could login on another user account. sudo to your home director and delete the .Xmodmap file.

As a said above this is mostly from memory so it might need correction. Also there are people on this list far more knowledgeable that me in this area who will know better.

Hope this helps.

Greg Thomson.




Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links