5
  • My system language is set to English and I want it to stay that way
  • My keyboard layout is set to USA intl and I want it to stay that way
  • I can't write ç, by pressing ´+c. When I try to do so it outputs ć
  • In Windows the keyboard layout country can be different from both system and input languages, which in their turn can be different from each other.
  • I want to achieve the same with Ubuntu
Jader Dias
  • 1,999

4 Answers4

7

Keyboard layouts are not dependent to countries (some countries don't have a keyboard layout, some have multiple, some keyboard-layouts are used in several countries, some keyboard layouts have no relation to any country, etc.).

So just change the keyboard layout to something else (I would suggest "US International with AltGr dead keys", or maybe to something else that you are used to).


Edit: it seems like by default US international behaves differently on Windows than in X; in Windows ' followed by c gives ç, while in X it gives ć.


Edit 2: okay, so I found a solution, but it doesn't work in Gtk/GNOME applications because of a stupid bug...

Create a file ~/.XCompose and put the following lines in it:

include "/usr/share/X11/locale/en_US.UTF-8/Compose"
<dead_acute> <C>        : "Ç" Ccedilla # LATIN CAPITAL LETTER C WITH CEDILLA
<dead_acute> <c>        : "ç" ccedilla # LATIN SMALL LETTER C WITH CEDILLA

Edit 3: Actually it does work in Gtk too when you select XIM as the import method for Gtk, and make sure it's selected in the Language Support dialog.

JanC
  • 19,422
  • I'm telling you. I am used to "US intl" set to Portuguese language. Your answer is not helpful – Jader Dias Nov 20 '10 at 19:21
  • What do you mean by "input language"? I have never seen an option to set that in any Windows version, and I have used most of them since 2.01 ? – JanC Nov 20 '10 at 19:42
  • Are you sure what you need is not one of the Portuguese or Brazilian layouts? – JanC Nov 20 '10 at 19:48
  • All Windows versions since 95 at least have this option. Look at this image for instance. First you have to choose the input language, and then you will choose the keyboard layout. – Jader Dias Nov 20 '10 at 19:50
  • @JanC I don't like Portuguese or Brazilian layouts. – Jader Dias Nov 20 '10 at 19:50
  • That's just a way to choose the language to use for spell checking etc., and doesn't change anything about the keyboard layout? – JanC Nov 20 '10 at 20:07
  • I think the problem is that US international is different between linux/X & Windows... – JanC Nov 20 '10 at 20:09
  • @JanC it's not about spell checking only, in Windows it really changes the behavior of some keys, like the combination of diacritics and letters – Jader Dias Nov 21 '10 at 15:57
  • @JanC It may be different, but I haven't detected any difference in the layout per se, just in the behavior – Jader Dias Nov 21 '10 at 15:57
  • @Jader: I tested US intl with English, Portuguese & Dutch in Windows, and it didn't change anything ('+c=ç), and I've never seen it change anything, but maybe it's true with other combinations... – JanC Nov 21 '10 at 21:28
  • ć is a Polish letter. but with Polish as input language in Windows 7 it still outputs ç. this strengthens your argument and weakens mine. – Jader Dias Nov 21 '10 at 21:57
3

My keyboard layout is set to USA intl and I want it to stay that way

So, in particular, ' is a dead key, right? (I can't be sure because there are several keyboard layouts that you might have abbreviated “USA intl”. To avoid ambiguities, use the exact full name in your question.)

I can't write ç, by pressing '+c. When I try to do so it outputs ć

That's normal. Acute accent + lowercase C = lowercase C with acute. You picked a “USA intl” keyboard variant, it has no reason to favor the characters used in Portuguese over the characters used in Polish.

(Windows's “USA International” does give you ç for '+C, but that's because their idea of “international” is “some Western European languages, with only latin1 characters”. Since ć is not in the latin1 character set, the combination '+'C' is mapped in a counter-intuitive way to a different character that does exist and is not otherwise accessible.)

If ' is indeed a dead key, you can change the characters it generates to specialize to your favorite language. There's no GUI for that, you have to write a configuration file. Copy /usr/share/X11/locale/en_US.UTF-8/Compose to .XCompose in your home directory. In .XCompose, look for lines that read

<dead_acute> <C> : "Ć"   U0106 # LATIN CAPITAL LETTER C WITH ACUTE
<dead_acute> <c> : "ć"   U0107 # LATIN SMALL LETTER C WITH ACUTE

and replace them by

<dead_acute> <C> : "Ç"   Ccedilla # LATIN CAPITAL LETTER C WITH CEDILLA
<dead_acute> <c> : "ç"   ccedilla # LATIN SMALL LETTER C WITH CEDILLA
1

If you add another keyboard layout, there will appear a new indicator icon that let's you chose which one you want to be active.

You can have as many as you want and change them on the fly. If you found one that works properly (which "US Alternate International" should do), you can remove all others and the indicator will disappear.

1

Goto System-->Preferences-->IBus Preferences it will show you a window click yes alt text

After clicking Yes.Another window will be shown like the one you see below alt text

You can change the input method to any language according to your wish and click add.New language will be added now.Now you can type in the selected languages,just press Ctrl+Space to toggle between the languages..For example if you choose Hindi, pressing Ctrl+Space will allow you to type in Hindi if you press Ctrl+Space again you can type in English.

Note:

If you are using ubuntu 10.10 you should install the following

sudo apt-get install ibus ibus-m17n m17n-db m17n-contrib ibus-gtk

To type this ç character.Goto System-->Keyboard-->Layouts and click Options alt text

Check Right Alt and then click close. alt text

Now Hold Right-Alt and then press c+, it will give you ç

karthick87
  • 81,947