Why is the US international keyboard layout on Debian different?

Summary

  1. If you are using Ubuntu, it probably changed around 2005, when the default character set changed from ISO 8859-1 to UTF-8.
  2. US Alternative International adds some dead keys.

The dead key settings depend on your locale and character set.

For example:

  • en_US.UTF-8 is defined in /usr/share/X11/locale/en_US.UTF-8/Compose
  • ISO 8859-1 is defined in /usr/share/X11/locale/iso8859-1/Compose

If you look in them using grep, you can see there is a difference:

$ grep '<dead_acute> <c>' /usr/share/X11/locale/en_US.UTF-8/Compose 
<dead_acute> <c>                    : "ć"   U0107 # LATIN SMALL LETTER C WITH ACUTE

$ grep '<dead_acute> <c>' /usr/share/X11/locale/iso8859-1/Compose
<dead_acute> <c>            : "\347"    ccedilla

Namely:

  • Latin1 encoding: ', c = ç
  • UTF-8 encoding: ', c = ć

The git logs ((en_US.UTF-8) (iso8859-1)) show it has been this way since at least 2004.


The difference between US International and US Alternative International is defined in /usr/share/X11/xkb/symbols/us.

Namely, the US Alternative International layout adds these extra AltGr dead keys:

  • dead_macron: on AltGr-minus
  • dead_breve: on AltGr-parenleft
  • dead_abovedot: on AltGr-period
  • dead_abovering: on AltGr-0
  • dead_doubleacute: on AltGr-equal (as quotedbl is already used)
  • dead_caron: on AltGr-less (AltGr-shift-comma)
  • dead_cedilla: on AltGr-comma
  • dead_ogonek: on AltGr-semicolon
  • dead_belowdot: on AltGr-underscore (AltGr-shift-minus)
  • dead_hook: on AltGr-question
  • dead_horn: on AltGr-plus (AltGr-shift-equal)
  • dead_diaeresis: on AltGr-colon (Alt-shift-semicolon)

For example:

  • US International: AltGr+- = ¥
  • US Alternative International: AltGr+-, a = ā

UTF-8 became the default encoding:

  • Red Hat 8.0 "Psyche", released September 30, 2002 reference
  • Ubuntu 5.04 "hoary", released April 8, 2005 reference
  • Debian 4.0 "etch", released as "stable" April 8, 2007 reference 1 reference 2

Complementing Vítor Souza answer

Using an US international keyboard layout with OS Language in English and having a beautiful cedilla.

To have English Language with ç/Ç working beautifully ( 'c -> cedilla ) isn't necessary to change the compose files. What one have to do is to set the LC_CTYPE with a locale that contains this definition:

<dead_acute> <c>            : "\347"    ccedilla.

Like pt_BR.UTF-8 (Brazilian Portuguese / Português Brasileiro).

X keyboard map:

# setxkbmap -layout us -variant intl

/etc/locale.conf

# nano /etc/locale.conf
LANG=en_US.UTF-8
LANGUAGE="en_US"
LC_CTYPE=pt_BR.UTF-8

Update locale

# source /etc/profile

And for tty:

Set the right keymap, font and font map, eg.

# nano /etc/vconsole.conf
KEYMAP=us-acentos
FONT=ter-114n
FONT_MAP=8859-1

From http://disi.unitn.it/~vitorsouza/linux/ubuntu-linux-10-10-maverick-meerkat/ and http://disi.unitn.it/~vitorsouza/linux/ubuntu-linux-10-04-lucid-lynx/:

Problem with cedilla:

Some nice fellow decided that an accented c (“ć”) is more importante than the c with a cedilla (“ç”), so the default behavior for pressing ‘ + c in international keyboards with deadkeys is now “ć”. Since I’m Brazilian and not Romanian or something, that definetly bothers me. ‘ + c used to output “ç” once upon a time.

To fix it, edit as root the file /usr/lib/gtk-2.0/2.10.0/gtk.immodules, find this line:

"cedilla" "Cedilla" "gtk20" "/usr/share/locale" "az:ca:co:fr:gv:oc:pt:sq:tr:wa"

And add :en after :wa, so it looks like this:

"cedilla" "Cedilla" "gtk20" "/usr/share/locale" "az:ca:co:fr:gv:oc:pt:sq:tr:wa:en"

Edit for Ubuntu 12.10 (source):

the gtk.immodules file to be edited is located at:

/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/gtk.immodules or /usr/lib/i386-linux-gnu/gtk-2.0/2.10.0/gtk.immodules


Edit for Debian Wheezy (and probably other gtk 3 stuff)

The file that needs to be edited is now

/usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules.cache

The gtk20 in the lines are now gtk30 but adding the :en in the end is just the same.


To fix it also for non-GTK applications, edit as root the file /usr/share/X11/locale/en_US.UTF-8/Compose and change all instances of ć with ç, and all instances of Ć with Ç.

You might need to repeat one or both operations from time to time, when you upgrade your system and it takes the configuration files back to their original contents.