Note: I am using the Gnome desktop environment

My laptop keyboard has only the keys it needs, and few of the normal compose keys available. I use them all. I'd like to set the compose key to End, but it's not on the list in Gnome Tweak Tool:

enter image description here

How can I set the compose key to End?

  • 1
    AFAIK you can't do that easily. It's a limitation of XKB, which would need to be modified somehow. – Gunnar Hjalmarsson Sep 19 '17 at 23:52
  • @GunnarHjalmarsson According to the Arch wiki on xkb, you can use xmodmap to set keys not offered by xkb as the compose key. I'm not up to testing it out right now, but this may work for OP. – chaskes Sep 20 '17 at 0:14
  • @chaskes Would I remap it to XF86Compose? Where did you see this? – Nonny Moose Sep 20 '17 at 11:51

I solved the problem with help from @chaskes:

xmodmap -e "keycode 115 = Multi_key End"

remapped the first level of End to the compose key, but allows me to press Shift-End to send an actual End keypress. I made this permanent by putting it in my ~/.xinitrc.

Other sources:

  • Awesome. Don't forget to accept your answer once it lets you. – chaskes Sep 20 '17 at 14:28
  • I will... Tomorrow. – Nonny Moose Sep 20 '17 at 14:54

On my system, the insert key is totally useless. Touching it could only create typing errors. And the name makes sense for a Compose key.

xev told me that the insert key is keycode 118.

So my ~/.xmodmap is 2 lines:

keycode 118 = Multi_key
! Insert key is Compose key.

And for backup, I execute this in my startup file:

xmodmap -e "keycode 118 = Multi_key"

I don't really know if both changes were necessary, but it works perfectly and I don't feel like messing with it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.