2

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?

muru
  • 197,895
  • 55
  • 485
  • 740
Nonny Moose
  • 2,255
  • 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 00:14
  • @chaskes Would I remap it to XF86Compose? Where did you see this? – Nonny Moose Sep 20 '17 at 11:51

2 Answers2

3

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:
https://unix.stackexchange.com/a/109472/
https://askubuntu.com/a/24930/

Nonny Moose
  • 2,255
2

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.

RickyS
  • 31