Subject: Gnome 3.21: how to define compose key?

From: Joost Kraaijeveld <[email-masked]>
Date: Sun, 11 Sep 2016 08:35:18 +0200

Hi,

I want to use my right super key (right win) as my compose key to be
able to type accented letters. 

I have read the online manual regarding the compose key but that does
not work: there is no (disabled) "Compose Key" in "Activities-
>Keyboard->Typing". (The manual actually say "Activities->Keyboard-
>Shortcut tab->Typing" but I assume that that is for a previous version
of Gnome)

How do I enable a Compose  Key in Gnome 3.21?

TIA

-- 
Groeten,

Joost Kraaijeveld

---

From: [email-masked]
Date: Mon, 12 Sep 2016 02:34:17 +0000 (UTC)

> able to type accented letters.

I don't use gnome, but I expect

  $ setxkbmap -option "compose:rwin"

would do what you want.

And if I wanted that behavior all the time, I would edit the file
/etc/default/keyboard, adding compose:rwin to the comma-separated list
of pairs in XKBOPTIONS.

So, for example, if I found this there, originally,

XKBOPTIONS="lv3:caps_switch,compose:ralt,grp:menu_toggle"

I would replace it like so:

#XKBOPTIONS="lv3:caps_switch,compose:ralt,grp:menu_toggle"
XKBOPTIONS="lv3:caps_switch,compose:rwin,grp:menu_toggle"

I would expect it to work. Maybe it will.

---

From: [email-masked]
Date: Mon, 12 Sep 2016 04:47:13 +0000 (UTC)

> /etc/default/keyboard, adding compose:rwin to the comma-separated list

Of course, editing that file will change the default system-wide, for
everybody. Even, erm, Mark! (...if running Ubuntu.)

Maybe that is not what you want.

---

From: Doug <[email-masked]>
Date: Mon, 12 Sep 2016 12:50:12 -0500

> Maybe that is not what you want.
It looks like your code sets up the right Win key to be Compose, I don't 
know why it would bother anyone using the machine. It wouldn't stay that 
way
if you rebooted into Windows, and the key does nothing at all (that I 
know of) in Linux. As it happens, I have an old IBM model M keyboard 
with no
Windows keys, so I use the right alt key. Also, PCLOS has an option in 
the keyboard setup to choose a Compose key. Are you sure that Debian 
doesn't
have that capability built in, somewhere?
(I happen to be a big fan of Compose, because even if you don't write a 
European language, it does other useful things—like that m-dash I just 
wrote.
And ½, ⅓, ⅜, ©, 75°, µF, 17¢, and others.)

--doug

---

From: [email-masked]
Date: Tue, 13 Sep 2016 05:07:28 +0000 (UTC)

On Mon, 12 Sep 2016, Doug wrote:

> It looks like your code sets up the right Win key to be Compose, I don't know 
> why it would bother anyone using the machine. It wouldn't stay that way
> if you rebooted into Windows, and the key does nothing at all (that I know 
> of) in Linux.

I see your point. That particular change is not going to surprise
anyone. It won't turn an expected character key into an unexpected
dead key, and then keep some other user from entering their password,
quotation marks, etc.

In other words, no fun at all.

> As it happens, I have an old IBM model M keyboard with no
> Windows keys, so I use the right alt key. Also, PCLOS has an option in the 
> keyboard setup to choose a Compose key. Are you sure that Debian doesn't

No, I am certainly not certain about that. And I imagine there are
desktop-environment-specific ways of configuring keyboard default
preferences like this, and doing so per-user. It will be interesting
to see if someone who uses the OP's DE suggests one.

In the meantime there is also this:

  # dpkg-reconfigure keyboard-configuation

It asks many questions. One of the questions it eventually asks is
about your compose key--whether you want one, which key you want it to
be, etc.

It edits /etc/default/keyboard to conform to your answers. So the same
caveat about "system-wide changes, hope everyone will be equally
thrilled" applies. A backup of the file you started with, before you
made changes, could be convenient to have.

> European language,

Aha, a Brexit joke. Good one.

> it does other useful things—like that m-dash I just wrote.

Mastery of sarcasm: Check.

> And ½, ⅓, ⅜, ©, 75°, µF, 17¢, and others.)

I see recognisable glyphs for five out of seven of those. My
environment does not support the other two.

So I know what they are not, but I don't know what they are. Very
mysterious. Could be IPA symbols. Could be a happy face next to a
clover/club symbol. I may never know.

---

From: Doug <[email-masked]>
Date: Tue, 13 Sep 2016 15:12:17 -0400

On 09/13/2016 01:07 AM, [email-masked] wrote:
>> It looks like your code sets up the right Win key to be Compose, I 
>> don't know why it would bother anyone using the machine. It wouldn't 
>> stay that way
>> know of) in Linux.
>> Windows keys, so I use the right alt key. Also, PCLOS has an option 
>> in the keyboard setup to choose a Compose key. Are you sure that 
>> Debian doesn't
>> (I happen to be a big fan of Compose, because even if you don't write 
>> a European language,
>
Don't know what you are not seeing. Here's what I wrote—and what I do see—

one-half, one-third,  three-eighths, copyright symbol, degree sign after 
75, Greek letter mu meaning micro before F (for Farads), cent sign after17.

--doug

---

From: [email-masked]
Date: Tue, 13 Sep 2016 21:35:38 +0000 (UTC)

On Tue, 13 Sep 2016, Doug wrote:
> one-half, one-third,  three-eighths, copyright symbol, degree sign after 75, 
> Greek letter mu meaning micro before F (for Farads), cent sign after17.

I see now.

Thank you.

--

---

From: David Wright <[email-masked]>
Date: Tue, 13 Sep 2016 15:40:01 -0500

On Tue 13 Sep 2016 at 15:12:17 (-0400), Doug wrote:
> >>It looks like your code sets up the right Win key to be Compose,
> >>I don't know why it would bother anyone using the machine. It
> >>wouldn't stay that way
> >>if you rebooted into Windows, and the key does nothing at all
> >>(that I know of) in Linux.
> >
> >>Windows keys, so I use the right alt key. Also, PCLOS has an
> >>option in the keyboard setup to choose a Compose key. Are you
> >>sure that Debian doesn't
> >>(I happen to be a big fan of Compose, because even if you don't
> >>write a European language,
> >
> one-half, one-third,  three-eighths, copyright symbol, degree sign
> after 75, Greek letter mu meaning micro before F (for Farads), cent
> sign after17.

Oh good, someone who uses these! Can you help me with how you use the
last of these characters:

⅓ ⅔ ⅕ ⅖ ⅗ ⅘ ⅙ ⅚ ⅛ ⅜ ⅝ ⅞ ⅟

It doesn't say it's a combining character and I can't find any
denominators anyway to go with it.

(For those people using fonts having qualities other than a wide
repertoire, they're the thirds, fifths, sixths and eighths followed
by a solitary 1/ numerator.)

Cheers,
David.

---

From: Doug <[email-masked]>
Date: Tue, 13 Sep 2016 19:46:03 -0400

> last of these characters:
Dave, I'm not sure, but I don't think you can write a number greater than 8
in this system.  I just tried to create one-ninth, but was unsuccessful.
Perhaps someone smarter than me has an answer.

BTW, there is at least one free Windows app that will give you just 
about the
same system--it's called (surprise!) WinCompose. Google it if you use 
Windows.
I only use Windows for some audio things that Linux kinda bombs on.

--doug

---

From: David Wright <[email-masked]>
Date: Wed, 14 Sep 2016 10:17:56 -0500

> >last of these characters:

Thank you to Siard; I grepped "denom" and not "subscript".

> Dav[id], I'm not sure, but I don't think you can write a number greater than 8

Not smarter; there's a list somewhere. Extracted:

2150    VULGAR FRACTION ONE SEVENTH
        # <fraction> 0031 2044 0037
2151    VULGAR FRACTION ONE NINTH
        # <fraction> 0031 2044 0039
2152    VULGAR FRACTION ONE TENTH
        # <fraction> 0031 2044 0031 0030
2153    VULGAR FRACTION ONE THIRD
        # <fraction> 0031 2044 0033

then as quoted above, and, knocking around:

2189    VULGAR FRACTION ZERO THIRDS
        * used in baseball scoring, from ARIB STD B24
        # <fraction> 0030 2044 0033

Cheers,
David.

---

From: "Neal P. Murphy" <[email-masked]>
Date: Tue, 13 Sep 2016 20:14:06 -0400

On Tue, 13 Sep 2016 19:46:03 -0400

> I only use Windows for some audio things that Linux kinda bombs on.

I've been using the right menu key (between R-ALT and R-CTRL) to compose for some years now

degree (°): <R-MENU> o o
mu (µ): <R-MENU> m u
elipsis (…) <R-MENU> . .
½ ⅓ ¼ ⅕ ⅙ ⅛ <R-MENU> 1 [2 3 4 5 6 8]
copyright (©) <R-MENU o c
trademark (™) <R-MENU> t m
paragraph (¶) <R-MENU> p !
not equal (≠) <R-MENU> / =
circled #24 (㉔) <R-MENU> ( 2 4 )
Spanish letter after 'n' (ñ) <R-MENU> ~ n
superscript 0 (⁰) <R-MENU> ^ 0
U with umlaut(?) (ü) <R-MENU> " u
em dash (—) <R-MENU> - - -

Look in /usr/share/X11/locale/en_US.UTF-8/Compose for the definitions. Not all of them work. Some (many?) may require keyboards capable of generating more than ASCII. But there are a lot of common uses (such as European 'diacritics').

These usually require programs that display UTF-8.

---

From: Siard <[email-masked]>
Date: Wed, 14 Sep 2016 00:00:27 +0200

> last of these characters:

Use the subscripts of digits.
E.g. ⅟  followed by <Compose_key> _2 <Compose_key> _5 <Compose_key> _6
yields ⅟₂₅₆  (1 divided by 256).

---

From: Siard <[email-masked]>
Date: Tue, 13 Sep 2016 12:04:53 +0200

[email-masked] wrote:
> I haven't yet seen a complete table (nor have I yet bothered to find out
> how one configures that in X -- some day I'll do).

Well, there is a complete listing in /usr/share/X11/locale/<locale>/Compose.
You can add or edit your own combinations there.

I should add that my <locale> en_GB.UTF-8 does not exist here [stretch],
but en_US.UTF-8 appears to be taking its place.