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.)

muru
  • 207,228
Owen_AR
  • 371

1 Answers1

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?)