(solved)remap a key

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
Nokto
Posts: 5
Joined: 30. Jun 2011, 13:48

(solved)remap a key

Post 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 :)
Last edited by Nokto on 9. May 2016, 12:22, edited 1 time in total.
User avatar
gapan
Salix Wizard
Posts: 6361
Joined: 6. Jun 2009, 17:40

Re: remap a key

Post by gapan »

Image
Image
Nokto
Posts: 5
Joined: 30. Jun 2011, 13:48

Re: remap a key

Post 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.
User avatar
gapan
Salix Wizard
Posts: 6361
Joined: 6. Jun 2009, 17:40

Re: remap a key

Post 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.
Image
Image
Nokto
Posts: 5
Joined: 30. Jun 2011, 13:48

Re: (solved)remap a key

Post by Nokto »

Thanks a lot Gapan, it works! The keysim is ubreve.
I uses altGr as you proposed instead of "^" and then "u".
Post Reply