"Most" of me in one single place

Main menu

Sub menu

Cedilla (ç) symbol using American Keyboards in Linux

Disclaimer: this article refers to using Linux with an American keyboard to type Portuguese (pt-br) text, using the ‘us-intl’ keyboard layout.

One of the things that bothered me when upgrading between Ubuntu versions a while back (Feisty for Gutsy? Hardy? I can’t remember) is the changed behavior for inputting the Cedilla ‘ç’ symbol using American keyboards.

Ok, in fact, this behavior changed twice over the time, so I can remember at least three ways of doing that:

Press the the single-quote (‘) key, then letter ‘c’ (' then c). In the us-intl keyboard layout, the single quote is a dead-key commonly used to insert an acute sign over vowels: á, é, í, ó, ú. Pressing the single-quote twice produces the single quote itself. A few years ago, the Cedilla sign was inputted by combining the single-quote dead key with the letter ‘c’ itself. This behavior changed: now, ' then c produces ć – maybe to support languages that require this symbol (after all we’re abusing the us-international layout) or simply a question of consistency.

Combining Right-Alt with the comma (,) symbol as dead-key, then pressing letter ‘c’ (Ralt+, then c). This is the the behavior introduced with newer versions of the us-intl keyboard layout. Just like before, you use the Right-Alt key as a Level-3 modifier, but instead of inserting the symbol directly, this key combination acts like a dead-key, waiting for the next key-press to determine what symbol is being inputted. In fact, this behavior was introduced with the ‘alt-intl’ layout which is said to mimic the previous behavior of us-intl (first item above) – well, at least for me it doesn’t exactly mimics the former behavior, and I personally prefer the second option.

Choosing between the second and the third options above is pretty straightforward if you’re using a relatively recent Linux distribution with Gnome 2.x and Xorg. Just use gnome-keyboard-properties to choose between USA International (with dead keys) or USA Alternative International (former us_intl) for the behavior found in item 2 and 3 above respectively. You can also have both configured and change between layouts using the Keyboard Indicator gnome applet:

gnome-keyboard-properties screenshot

In case you are not using Gnome and prefer to configure it directly in Xorg’s configuration, edit the InputDevice section at the X.org server configuration file, usually /etc/X11/xorg.conf, to look like below:

The line with “XkbOptions” “lv3:ralt_switch” was indifferent to (at least) the Cedilla behavior, thus I commented it (I have a feeling that the ralt_switch behavior is included anyway for both variants).

Troubleshooting

If even after doing the above you can’t get the desired behavior, check the following:

Your window manager configuration usually precedes your X server configuration – That is, if you configured your keyboard layout using Gnome or KDE tools, the settings in your xorg.conf are probably being ignored. Within gnome, you can use gconf-editor and browse to /desktop/gnome/peripherals/keyboard/kdb to check the current effective configuration. Leave a comment if you know how to override this.

Your X server may have been automagically configured by HAL and friends. You can check that by opening the X server log (usually /var/log/Xorg.0.log) and looking for the evdev module. There should be a couple of messages showing which model/layout/variant was chosen:

(Change the variant from intl for alt-intl according to your choice). Remember to restart the HAL daemon (hald) for the changes to take effect

More information about HAL and the evdev module can be found at this blog post.

I hope this post was useful to shed some light into this (somewhat common) problem among pt-br users that don’t necessarily use Brazilian keyboards or run their systems in that locale. Leave a comment if you find this post useful, have questions, comments, corrections, anything

Man, this was really enlightening. I’m brazilian and got stuck on this around several distributions I’ve used or installed on friend’s computers. Now I can choose between behaviours, and stop wondering how the hell did I fix this that one last time.
Much thanks./