Page 1 of 1

(solved)remap a key

Posted: 8. May 2016, 11:40
by Nokto
Hello,

I am using french keyboard layout (azerty/fr-latin9) and I am very find with this but I would like to only remap a single key (I would like ^ + u to map to "ŭ" (esperanto accented u).

I have naively tried to write an ~/.XCompose file:

Code: Select all

include "%L"
<dead_circumflex> <u> : "ŭ" U016D 
<dead_circumflex> <U> : "Ŭ" U016C 
<dead_circumflex> <v> : "û" U00FB 
<dead_circumflex> <V> : "Û" U00DB
but it does not appear to be used.

Thanks if you have any help :)

Re: remap a key

Posted: 8. May 2016, 11:51
by gapan

Re: remap a key

Posted: 8. May 2016, 12:16
by Nokto
Thanks Gapan.

I understand that it is a <linux general question ... not specific to salix.

Moreover my question appears more difficult that what I wrote first:
I don't want to remap a simple key, I want to remap a combinaison of keys: I want "^"+"u" so I cannot do a specific:

Code: Select all

xmodmap -e 'keycode keycode 34=UC5AD' 
I would need to do something such as

Code: Select all

xmodmap -e 'keycode keycode 34 + keycode 30=UC5AD'
which is not valid.

Re: remap a key

Posted: 8. May 2016, 22:26
by gapan
I'm not sure what you mean by "^"+"u". Do you mean Control+u, or the actual ^ key that is right next to the P key on an azerty keyboard? If it's the latter, I don't think it's possible. You can create key combinations only with modifier keys, not "normal" keys.

If you need the Control key, you probably first need to remap it to something else, like mode_switch. It would be much easier if you used the AltGr key as modifier. I can remap the U key in my keyboard (keycode 30) to output the ũ and Ũ characters using AltGr+u and Shift+AltGr+u, respectively with:

Code: Select all

xmodmap -e "keycode 30 = u U Greek_theta Greek_THETA utilde Utilde"
(I also need the greek θ and Θ characters for my greek keyboard)

I don't know the keysym for the esperanto accented u, but if you do something similar for the keycode you want to use and use that keysym instead of utilde, it should work with the AltGr key in a similar way.

Re: (solved)remap a key

Posted: 9. May 2016, 12:23
by Nokto
Thanks a lot Gapan, it works! The keysim is ubreve.
I uses altGr as you proposed instead of "^" and then "u".