I added setxkbmap -option "compose:ralt" to my .xinitrc to map the right alt key as the compose key (Multi_key) and copied the default .XCompose file to my home directory.

Why is the compose key now not working, when I for example try to write # with the defined key combination right alt++++ nothing happens.

Here is that default line in the .XCompose file:

<Multi_key> <plus> <plus>           : "#"   numbersign # NUMBER SIGN

Why is it not working? What is the best way to check if the compose key is set the right way? I'm running arch linux with X and i3wm as the window manager.

Running xev and using that key shows that output:

KeyRelease event, serial 33, synthetic NO, window 0x2c00001,
    root 0x13c, subw 0x0, time 1833869, (0,52), root:(964,91),
    state 0x8, keycode 108 (keysym 0xffea, Alt_R), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

So my computer detects the ALT_R key. Does that mean the problem arch does not see it as the compose key?

  • 1
    Run xev from a terminal and press RAlt in the xev window. What KeyPress event appears in the terminal? – Gilles May 11 '17 at 23:42
  • I updated my answer – Jonas May 12 '17 at 20:02
  • So that setxkbmap call doesn't seem to have had any effect. Does it work if you run it from a terminal after logging in? Are you sure that it got executed as part of your login scripts? Maybe something else in your configuration overrides it afterwards — that's a common issue people have with some desktop environments, though it would be less likely to happen with a simple window manager, but still do check. – Gilles May 12 '17 at 23:46
  • I did not use my computer a few days, but after starting it today the compose key magically works. I rebooted the computer after changing my .xinit file, so another reboot today should not be the reason. I can't explain why it is working now. – Jonas May 14 '17 at 13:32

Your Answer

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

Browse other questions tagged or ask your own question.