Jump to content

User talk:209.183.136.7

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

compose key software

[edit]

Your recent edit on "Ordinal indicator" stated that Compose^_a results in "ª", but https://help.ubuntu.com/community/GtkComposeTable states that the sequence is just Compose_a. Could you check if this also works for you, and if it doesn't, are you willing to state what software stack you're testing this on?

Thanks, Solomon Ucko (talk) 01:13, 19 October 2024 (UTC)[reply]

I am running Linux Mint 21.3 with the Cinnamon desktop, under X11.
On this system, the compose key bindings are defined by X11, not by Gnome. Here's the Compose bindings on my system, straight from the X11 repo: <https://www.x.org/releases/X11R7.7/doc/libX11/i18n/compose/en_US.UTF-8.html>
On this system, "Compose _ a" yields ā and "Compose ^ _ a" yields ª. I tried this in gedit and firefox, which are supposed to be GTK apps, and the behaviour is the same, matching the X11 standard, not the Gnome standard.
I do not have access to a Gnome system to test, but I suppose that the behaviour you experience is specific to the Gnome Desktop Environment. It's possible that if you test this in a non-GTK app on your Ubuntu system, you may find that the X11 compose bindings are used there. 209.183.136.7 (talk) 02:41, 19 October 2024 (UTC)[reply]
Got it, interesting, thanks! Also, the link you provided should be helpful for adding references to this bit of the article.
I got back to my Linux computer, and I somehow have yet another behavior: Compose _ a and Compose a _ both result in ā for me too, but Compose ^ _ and Compose _ ^ result in ¯ for me, with no obvious way to get ª. For me, this seems like it might be controlled by my keyboard layout, which according to xfce4-settings, I have set to "English (intl., with AltGr dead keys)"; /usr/share/X11/xkb/rules/evdev.xml indicates that this is internally labeled altgr-intl. I'm running a Franken-Debian with xfce4 version 4.18, libx11-6 version 2:1.8.4-2+deb12u2, and x11-xkb-utils version 7.7+7 according to apt.
Solomon Ucko (talk) 03:06, 19 October 2024 (UTC)[reply]
Setting your keyboard layout to "English (intl. with AltGr dead keys)" enables a keyboard map that interprets the Right Alt key as AltGr. For example, "AltGr+E" gives é and "AltGr+Shift+E" gives É in this layout. The keyboard layout doesn't affect Compose sequences, which AFAIK are universally available across keyboard layouts, as long as you have defined a Compose key.
On my system, Compose _ ^ is ¯ (macron) like on your system. If Compose ^ _ is also producing macron then you are using a non-standard Compose file I don't know about, see below.
On my system, the Compose bindings are defined by /usr/share/X11/locale/en_US.UTF-8/Compose. (Different locales have different Compose files.) This file is part of the libx11-data Ubuntu package, which on my system, according to "apt-cache show libx11-data", is version 2:1.7.5-1ubuntu0.3. It says "This module can be found at https://gitlab.freedesktop.org/xorg/lib/libX11". If I follow this link and navigate to <https://gitlab.freedesktop.org/xorg/lib/libx11/-/blob/master/nls/en_US.UTF-8/Compose.pre?ref_type=heads>, then I find a Compose file that is more up to date than mine (last modified July 20, 2024), but with the same Compose sequences defined for the Ordinal symbols. Looking at the history of this file and the masculine ordinal,
  • in 2003 (X11R6.6) it was _o | o_ | _O | O_. Also, ^_ is macron, like on your system.
  • in 2004, it changed to the current design: ^_o, and hasn't changed since.
There are many locales, but each locale has a character encoding, and only character encodings that contain the ordinals can have a compose sequence for the ordinals. Nowadays, everybody uses UTF-8, and most of the non-UTF-8 locales are presumably of historical significance only.
Of the non-UTF-8 locales, the ones with ordinals are iso8859-9, iso8859-15, iso8859-1, iso8859-9e. These are historic 8-bit extended ASCII character encodings.
Of the UTF-8 locales, they all use ^_o, except for el_GR.UTF-8 (o_ _o O_ _O) and am_ET.UTF-8 (no ordinals).
I can't account for the behaviour on your system by looking at the X11 source code. 209.183.136.7 (talk) 13:58, 19 October 2024 (UTC)[reply]
Got it, huh. I have libx11-data version 2:1.8.4-2+deb12u2.
I'm not completely sure what locale I'm set to, but en_US.UTF-8 seems plausible, and my /usr/share/X11/locale/en_US.UTF-8/Compose file includes the following lines:
  • <dead_macron> <space>  : "¯" macron # MACRON
  • <dead_macron> <dead_macron>  : "¯" macron # MACRON
  • <Multi_key> <minus> <asciicircum>  : "¯" macron # MACRON
  • <Multi_key> <underscore> <space>  : "¯" macron # MACRON
  • <Multi_key> <space> <underscore>  : "¯" macron # MACRON
  • <Multi_key> <underscore> <underscore>  : "¯" macron # MACRON
  • <Multi_key> <underscore> <asciicircum>  : "¯" macron # MACRON
  • [...]
  • <dead_circumflex> <Multi_key> <underscore> <a>  : "ª" ordfeminine # FEMININE ORDINAL INDICATOR
  • <Multi_key> <asciicircum> <underscore> <a>  : "ª" ordfeminine # FEMININE ORDINAL INDICATOR
  • <dead_circumflex> <Multi_key> <underscore> <o>  : "º" masculine # MASCULINE ORDINAL INDICATOR
  • <Multi_key> <asciicircum> <underscore> <o>  : "º" masculine # MASCULINE ORDINAL INDICATOR
  • [...]
  • <dead_macron> <nobreakspace>  : "̄" U0304 # COMBINING MACRON
OTOH, my /usr/share/X11/locale/C/Compose is empty, but /usr/share/X11/locale/compose.dir includes the line iso8859-1/Compose C, and my /usr/share/X11/locale/iso8859-1/Compose includes the following lines:
  • <Multi_key> <a> <underscore>  : "\252" ordfeminine
  • <Multi_key> <underscore> <a>  : "\252" ordfeminine
  • <Multi_key> <A> <underscore>  : "\252" ordfeminine
  • <Multi_key> <underscore> <A>  : "\252" ordfeminine
  • <Multi_key> <o> <underscore>  : "\272" masculine
  • <Multi_key> <underscore> <o>  : "\272" masculine
  • <Multi_key> <O> <underscore>  : "\272" masculine
  • <Multi_key> <underscore> <O>  : "\272" masculine
  • [...]
  • <Multi_key> <minus> <asciicircum>  : "\257" macron
  • <Multi_key> <asciicircum> <minus>  : "\257" macron
  • <Multi_key> <underscore> <asciicircum>  : "\257" macron
  • <Multi_key> <asciicircum> <underscore>  : "\257" macron
  • <Multi_key> <underscore> <underscore>  : "\257" macron
  • [...]
  • <dead_circumflex> <minus>  : "\257" macron
  • <dead_circumflex> <underscore>  : "\257" macron
However, while I'm not sure how to activate the dead keys, the other sequences in both of these lists that are supposed to result in ordinal indicators do not work for me. For example, testing in multiple apps including Terminal and Firefox, Compose ^ _ a gives me ¯a and Compose _ a gives me ā. I have no clue what's going on here, but there's a good chance I might've screwed up my computer somehow...
Meanwhile, I updated the article to add the sources we previously linked, along with information about the sequences they mention: https://en.wikipedia.org/w/index.php?diff=1251973448&oldid=1251954164&title=Ordinal_indicator
Solomon Ucko (talk) 18:21, 19 October 2024 (UTC)[reply]
Thanks for updating the article.
The C locale Compose file is empty because the C locale uses ASCII, and assumes your keyboard can generate all of the ASCII characters directly without using compose sequences.
Since you are using the keyboard layout "English (intl., with AltGr dead keys)", that means you have some dead keys you can type. On my system I can select the keyboard layout and ask to see a graphical image of the keyboard layout, using either the Keyboard control panel (Layouts tab, then click the keyboard icon), or using an icon in my system info pane on my desktop. Looking at this, AltGr-6 should give you <dead_circumflex>. AltGr-Shift-3 should give <dead_macron>. Eg, try AltGr-6 then "a" to get â.
I just tried <dead_circumflex> <compose> _ a and it worked, I got ª.
Re screwed up computer. X11 uses a search path to find Compose files. See man 5 Compose. You might have an extra Compose file that is overriding the main system Compose file, perhaps named by $XCOMPOSEFILE or in ~/.XCompose. As for determining your locale, see man 7 locale. My environment sets LANG=en_CA.UTF-8. 209.183.136.7 (talk) 21:20, 19 October 2024 (UTC)[reply]
When I check in my terminal, I see that my LANG environment variable is indeed set to en_US.UTF-8. I also found the directory /etc/console-setup/; I don't see a file for UTF-8, but compose.ISO-8859-1.inc includes the following lines:
  • compose '-' '^' to macron
  • ...
  • compose '^' '-' to macron
  • ...
  • compose '^' '_' to macron
  • ...
  • compose '_' '^' to macron
  • compose '_' '_' to macron
  • compose '_' 'a' to ordfeminine
  • compose '_' 'o' to masculine
However, your advice for the dead keys worked! RightAlt+6 Compose _ a does indeed give me ª. (And likewise RightAlt+6 Compose _ o gives me º.)
Solomon Ucko (talk) 02:29, 20 October 2024 (UTC)[reply]
I think that /etc/console-setup is only relevant when you are using the Linux Console, which isn't relevant to typing text into an X11 app or X11 terminal emulator.
```
$ dpkg -S /etc/console-setup/
console-setup-linux: /etc/console-setup
$ apt-cache show console-setup-linux
Description-en: Linux specific part of console-setup
This package includes fonts in psf format and definitions of various
8-bit charmaps.
$ apt-cache show console-setup
Description-en: console font and keymap setup program
This package provides the console with the same keyboard
configuration scheme as the X Window System. As a result, there is no
need to duplicate or change the keyboard files just to make simple
customizations such as the use of dead keys, the key functioning as
AltGr or Compose key, the key(s) to switch between Latin and
non-Latin mode, etc.
.
The package also installs console fonts supporting many of the
world's languages. It provides an unified set of font faces - the
classic VGA, the simplistic Fixed, and the cleaned Terminus,
TerminusBold and TerminusBoldVGA.
``` 209.183.136.7 (talk) 02:53, 20 October 2024 (UTC)[reply]
Ah, got it, makes sense, thanks.
Solomon Ucko (talk) 03:34, 20 October 2024 (UTC)[reply]