9

I recently installed LXDE in Ubuntu 11.10, so that I can choose it at the login screen, but I've since noticed that there's no compose key (since I enabled it in Gnome Shell and Unity) so I was wondering how to enable a compose key?

Thanks for any help :)

4 Answers 4

13

setxkbmap -option "compose:caps" for CapsLock

setxkbmap -option "compose:ralt" for right alt =)

3
  • 1
    Hi, I did that for the right alt, but then I did it for the right ctrl instead, is there anyway to get rid of the one for the right alt, as now I can't use the Euro sign, as Alt gr doesn't work anymore, thanks :) Nov 5, 2011 at 16:15
  • 2
    This messes up other keys on my machine.
    – l0b0
    Apr 12, 2012 at 15:00
  • This doesn't work for my with Lubuntu in a Virtualbox. Instead altgr opens up the context menu. Any further suggestions? How do I tell if the setting was correctly applied? How can I tell LXDE to unbind the menu behavior from AltGr? Jan 27, 2014 at 12:49
8

To set the compose key

sudo leafpad /etc/default/keyboard

edit XKBOPTIONS to like this

XKBOPTIONS="compose:Shift+AltGr"   

To get a list of available keys:

grep compose /usr/share/X11/xkb/rules/xorg.lst

Reboot for the change to be applied or

setxkbmap -option "compose:Shift+AltGr"

To check if the option was set correctly

setxkbmap -print -verbose 10

Example:

press Shift then AltGr and release then click on "o c" to obtain ©.

Additional reading

1
  • Excellent answer! I might add that after editing /etc/default/keyboard a simple login/logout maneuver (which usually is enough when people say 'reboot') did not work for me (on Lubuntu 16.04). After a proper reboot it worked however!
    – zrajm
    Sep 11, 2017 at 22:56
2

You can check if the keyscan code on your keyboard same as default setting. Did you check if you can do the compose by selecting predefined keyboard with Compose key?

0

For iBus, you can use

setxkbmap -option "lv3:ralt_switch_multikey"

This is defined in /usr/share/X11/xkb/rules/ as "Right Alt [for 3rd level], Shift+Right Alt key is Compose"

This is also included when you select the gb layout:

setxkbmap -layout gb

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .