LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   customize the keyboard under X (xmodmap) (https://www.linuxquestions.org/questions/linux-general-1/customize-the-keyboard-under-x-xmodmap-747395/)

linuxien2 08-13-2009 05:54 PM

customize the keyboard under X (xmodmap)
 
Hi,
this is the most accurate link that I've been able to find concerning some explanation about xmodmap. But nothing is clear in my mind.

Each key is defined like this :
Code:

keycode <x> = <1> <2> <3> <4> <5> <6> <7> <8>
1st is got by pressing the key
2nd is got by pressing the key + shift
3rd is got by pressing the key + mode_switch
4th is got by pressing the key + mode_switch + shift
5th,6th is got by pressing the key + key_num but it doesn't work for me.

by default mode_switch doesn't exist so I've configured my Control right key into mode_switch :
Code:

keycode 105 = Mode_switch Control_R

QUESTION 1

My Goal is to find a way to make the 5th and 6th (and if possible 7th and 8th) work in the same way the 3rd and the 4th work with the mode_switch key
I've been able to reach the 5th, 6th, 7th and 8th with : ISO_Next_Group
Code:

keycode 133 = ISO_Next_Group ISO_Prev_Group ISO_Next_Group ISO_Prev_Group ISO_Next_Group ISO_Prev_Group ISO_Next_Group ISO_Prev_Group
but it's very uncomfortable because when you release the keycode 133 key, you STAY in the Group. while I want to be back to the default Group (Group 1) when I release the keycode 133 key.

Is there a way to do so please?

QUESTION 2

By the way I've understand nothing about the 8 modifiers in xmodmap.
they are : shift,lock,control,mod1,mod2,mod3,mod4,mod5
If I clear shift, lock, control then Shift,Capslock and Control keys don't work anymore. Ok.
But concerning mod1 => mod5 ??? what are they for? I have cleared them all and evrything continue to work with my keyboard. For example Alt left key is linked to mod1. If I clear mod1, in firefox the combination alt+f continue working. It's strange isn't it?

And the manual say nothing about them :s just they are modifiernames ...

Is there someone that understands what mod1~mod5 are made for please?

I would appreciate any help cause it's been 1 week since I try to configure my keyboard xD

linuxien2 08-18-2009 04:35 AM

up :)

linuxien2 08-23-2009 11:07 AM

ok problem solved with xkbcomp ;)
it's more complicatated I think but it allows to do more things than xmodmap :)

here is a good guide : http://www.charvolant.org/~doug/xkb/html/index.html

tredegar 08-23-2009 12:34 PM

I hate to see people talking to themselves, so thanks for the above posts, and welcome to LQ!

linuxien2 08-24-2009 05:26 AM

Hi tredegar
well xmodmap isn't very used I think. So there might be few people knowing this tool very well I fear. ^^p
Thank you for the welcome ;)

LQ is a very great source of information !
long life to it :D and thanks to the staff making this beautiful site work ^^


All times are GMT -5. The time now is 06:28 AM.