Score:0

Can't get Compose key in Lubuntu to work

nr flag

I have tried to set up my Compose key in Lubuntu 20.04LTS and am having no luck.

I've gotten to where I see

org.gnome.desktop.input-sources xkb-options ['compose:ralt']

But am unable to get any combinations to work. Nothing happens. For example, if I want to make a "ñ" character, I press the "Alt Right" key (then unpress it). Then I press Shift and ` to get the tilde (and unpress). Then "n" for the n. And it simply shows me "~n" as if I'd typed those two characters in the first place.

Am I doing something wrong in the key presses? Do I need to hold Alt-Rt down for instance and see a prompt the way the Cntl-Shift-U underlines the "u" and signals it's waiting for a Unicode?

Or do I hold down the Alt-Rt key the whole time I'm pressing? If so, this seems very awkward for typing.

Really confused and frustrated with the difficulty of getting these simple accented characters to appear.

Score:2
nr flag

Well, in further sleuthing, I found that in Lubuntu, apparently, the gnome-tweaks settings don't have any effect. I used

setxkbmap -query

And it showed nothing for the compose variable.

So I then typed

setxkbmap -option "compose:ralt"

And lo and behold, it now works as it is supposed to. I have a feeling that I'll need to figure out how to make this setting sticky so I don't have to run it each time I log in, but at least it's working. What a relief!

Gunnar Hjalmarsson avatar
uz flag
It looks like you found the gsettings command for Ubuntu somewhere, while it apparently does not apply in the LXQt environment. I suspect that there is a GUI option for defining a compose key persistently. Optionally you may want to figure out the gsettings command which applies to LXQt.
guiverc avatar
cn flag
I have no real idea what a "Compose" key is, thus didn't provide reponse; Lubuntu uses LXQt & and the Qt5 stack below that; GNOME uses GTK3 so expecting gnome changes/tweaks to take effect when it's not being used was hopeful (*some will as some tweaks will impacts parts that are common in both so maybe that's what you were hoping*). I'll provide a manual link https://manual.lubuntu.me/lts/F/keyboard_shortcuts.html (Note: Since release of 22.10; the LTS manual is now 22.04, so 20.04's manual was dropped this month). More detail exists on Lubuntu's phab too
guiverc avatar
cn flag
If you want something to autostart when you login to LXQt; refer https://manual.lubuntu.me/lts/3/3.2/3.2.13/session_settings.html (*Note: that's the 22.04 manual as of a little over a week ago, we only have the 20.04 manual now in unpublished form*) though you could run the command in other ways too. Well done for working it out though, and thanks for sharing your result(s).
Score:1
uz flag

Probably you use a keyboard layout which enables Right Alt as the third level modifier. In that case, in order to use that particular key as compose key, you can run this command:

gsettings set org.gnome.desktop.input-sources xkb-options "['compose:ralt', 'lv3:ralt_alt']"

OTOH, in that case — to access 3rd and 4th level symbols — you need to pick some other key as the third level modifier.

A simpler solution is to choose some other key but Right Alt as the compose key.

nr flag
Thank you, I appreciate the suggestion. I have tried with several different keys. Scroll-lock, the right-windows key, and the right-alt. None work, and yes, that could mean that they're ALL 3rd modifiers, perhaps? But seems unlikely.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.