2

I'm trying to make it so that these compose sequences produce these characters:

AA ==> Ä
OO ==> Ö
UU ==> Ü
aa ==> ä
oo ==> ö
uu ==> ü

I tried modifying my ~/.XCompose, and my system compose, but it isn't working (after a complete restart).

I still get the defaults.

(

AA ==> Å
OO ==> [nothing]
UU ==> Ŭ
aa ==> å
oo ==> °
uu ==> ŭ

)

What's the trick for getting this to work?

Here's my ~/.XCompose (exactly as it is now; a bit of "babbling" from initial experiments and notes is in there too, but I don't think it should be affecting anything, ne?):

# ~/.XCompose
# This file defines custom Compose sequences for Unicode characters

# Import default rules from the system Compose file:
include "/usr/share/X11/locale/en_US.UTF-8/Compose"

# To put some stuff onto compose key strokes:

<Multi_key> <s> <s> : "ß"   ssharp # LATIN SMALL LETTER SHARP S
<Multi_key> <A> <A> : "Ä"   Adiaeresis # LATIN CAPITAL LETTER A WITH DIAERESIS
<Multi_key> <O> <O> : "Ö"   Odiaeresis # LATIN CAPITAL LETTER O WITH DIAERESIS
<Multi_key> <U> <U> : "Ü"   Udiaeresis # LATIN CAPITAL LETTER U WITH DIAERESIS
<Multi_key> <a> <a> : "ä"   adiaeresis # LATIN SMALL LETTER A WITH DIAERESIS
<Multi_key> <o> <o> : "ö"   odiaeresis # LATIN SMALL LETTER O WITH DIAERESIS
<Multi_key> <u> <u> : "ü"   udiaeresis # LATIN SMALL LETTER U WITH DIAERESIS

<Multi_key> <;> <s> : "ß"   ssharp # LATIN SMALL LETTER SHARP S
<Multi_key> <;> <A> : "Ä"   Adiaeresis # LATIN CAPITAL LETTER A WITH DIAERESIS
<Multi_key> <;> <O> : "Ö"   Odiaeresis # LATIN CAPITAL LETTER O WITH DIAERESIS
<Multi_key> <;> <U> : "Ü"   Udiaeresis # LATIN CAPITAL LETTER U WITH DIAERESIS
<Multi_key> <;> <a> : "ä"   adiaeresis # LATIN SMALL LETTER A WITH DIAERESIS
<Multi_key> <;> <o> : "ö"   odiaeresis # LATIN SMALL LETTER O WITH DIAERESIS
<Multi_key> <;> <u> : "ü"   udiaeresis # LATIN SMALL LETTER U WITH DIAERESIS

<Multi_key> <s> <;> : "ß"   ssharp # LATIN SMALL LETTER SHARP S
<Multi_key> <A> <;> : "Ä"   Adiaeresis # LATIN CAPITAL LETTER A WITH DIAERESIS
<Multi_key> <O> <;> : "Ö"   Odiaeresis # LATIN CAPITAL LETTER O WITH DIAERESIS
<Multi_key> <U> <;> : "Ü"   Udiaeresis # LATIN CAPITAL LETTER U WITH DIAERESIS
<Multi_key> <a> <;> : "ä"   adiaeresis # LATIN SMALL LETTER A WITH DIAERESIS
<Multi_key> <o> <;> : "ö"   odiaeresis # LATIN SMALL LETTER O WITH DIAERESIS
<Multi_key> <u> <;> : "ü"   udiaeresis # LATIN SMALL LETTER U WITH DIAERESIS

# examples:
# <Multi_key> <apostrophe> <apostrophe> : "☕"   acute # ACUTE ACCENT
# <Multi_key> <minus> <greater> : "→" U2192 # Compose - >
# <Multi_key> <colon> <parenright> : "☺" U263A   # Compose : )
# <Multi_key> <b> <t> <w> : "by the way" # Compose b t w
# <Multi_key> <less> <p> : "<p></p>" # Compose < p

And here's the beginning of my system Compose (too big to paste the whole thing).

I regex-replace'd out any lines that would've had the same beginning as the new lines I added at the top.

(So <Multi_key> <([AaUuOo])> <\1> gets no matches beyond the lines I added at the top.)

/usr/share/X11/locale/en_US.UTF-8/Compose

# UTF-8 (Unicode) compose sequence
# David.Monniaux@ens.fr
#

# Part 1 - Manual definitions

# Spacing versions of dead accents

<Multi_key> <s> <s> : "ß"   ssharp # LATIN SMALL LETTER SHARP S
<Multi_key> <A> <A> : "Ä"   Adiaeresis # LATIN CAPITAL LETTER A WITH DIAERESIS
<Multi_key> <O> <O> : "Ö"   Odiaeresis # LATIN CAPITAL LETTER O WITH DIAERESIS
<Multi_key> <U> <U> : "Ü"   Udiaeresis # LATIN CAPITAL LETTER U WITH DIAERESIS
<Multi_key> <a> <a> : "ä"   adiaeresis # LATIN SMALL LETTER A WITH DIAERESIS
<Multi_key> <o> <o> : "ö"   odiaeresis # LATIN SMALL LETTER O WITH DIAERESIS
<Multi_key> <u> <u> : "ü"   udiaeresis # LATIN SMALL LETTER U WITH DIAERESIS

(Compose-ss ==> ß is the default behavior, and does already work.)

  • I suppose you've been trying these sequences out in Gedit (the standard Ubuntu text editor)? The GNOME devs decided it would be a good idea to implement hard-coded compose sequences into GTK-based applications. Fortunately there is a way to circumvent this by defining an environment variable. Check this Q&A out for more information. – Glutanimate Nov 15 '13 at 16:10
  • possible duplicate of How can I add a custom compose key sequence? – Glutanimate Nov 15 '13 at 16:11
  • @Glutanimate Not Gedit, actually, but in Sublime, Firefox, Konsole (or in Yakuake, anyway, which I'm p sure is Konsole inside) etc... (I'm on Kubuntu). I was just trying to figure it out from this wiki page, but I immediately found directions that talk about files that don't exist on my computer... "The descriptions have been tested on several Kubuntu Hardy Heron 8.04.1 systems". Bluh. – Owen_R Nov 15 '13 at 16:26
  • Well, I tested the accepted answer to that question (changed include "/usr/share/X11/locale/en_US.UTF-8/Compose" to include "%L" and added export GTK_IM_MODULE="xim" (and export QT_IM_MODULE="xim") to my ~/.profile file and restarted X. Compose-aa still gets å. So since the accepted answer to that question doesn't answer my question, shouldn't we say my question is not a duplicate of that question? – Owen_R Nov 15 '13 at 17:15
  • I am sad to hear that the solution didn't work for you. You're right, it doesn't sound like a duplicate so I'd advise all future voters not to close vote this. I suggest you add some more information about your findings to your question, though. Edit the text and list everything you've tried so far and as much information about your system as you can. This will make it easier for other users to help you and it will also bump the question to the top of the homepage. – Glutanimate Nov 15 '13 at 18:05
4

What just worked for me (my .XCompose setup had stopped working sometime around Saucy) was to switch to UIM. It was actually painless and did what I wanted, which left me somewhat shocked :-)

$ sudo apt-get install uim
$ im-config -n uim

(and log out and back in to restart X)

Voilà! I can type grεeκ letters again! Also Shift-Ctrl-U works (though I doubt I'll use it much). Switching keyboard layouts through the GNOME 2 menu also still works.

(Also, you didn't ask, but you should just be able to say include "%L" at the beginning of the file to pull in the right thing automatically. But maybe don't fix what ain't broke?)

|improve this answer|||||

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.