Entering International Characters

or "How Do I Enter That Accent on Your Name?"

Being a guy with an accent on one of the letters of his name, you can imagine that I probably spend a lot of time entering so-called "special characters" in my documents and e-mails. Short of keeping a document with these letters already written, then copying, and pasting them, entering an é can be amazingly time consuming. Worst of all, while OpenOffice.org lets me click Insert, Special Character to select from a list, not all applications have a handy list of characters to choose from. For everyone out there who routinely has to enter special characters or letters with accents, I'm going to give you a great KDE trick to use that will ease the pain.

Start by firing up kcontrol, the KDE control center. Under "Regional & Accessibility", select the submenu for Keyboard Layout. Over on the right hand pane, you'll see a bunch of flags from different countries listed. Click "Enable keyboard layouts" to un-gray these choices. The default is to provide you with "U.S. English". I always add "U.S. English w/deadkeys" to that list. Click the image below to see a full size capture of this dialog.


You'll notice I didn't add French. That's because I honestly don't know how a French keyboard is laid out.

When you click OK or Apply, a little icon that looks like a tiny flag will appear in your icon tray -- there's a small screen capture of the system tray part of my Kicker panel below. Clicking that will switch between the various layouts (of which there are two at the moment). Notice that the flag changes to highlight that you are working with a different layout.

When you are on the "U.S. English w/deadkeys" layout, you can touch the single quote before entering an "e" and a "e" with an acute accent will appear. Same trick works for the "c" with a cedilla. Now, for an accent grave, use the back quote before the
character and so on.

   é è ê ç à É À

The grave accent is the back quote while the circumflex accent is your basic Shift-6. Cool? Best of all, I don't have to remember Alt+somedarncode to enter a "é" at the end of my name. The only catch is that you have to return the keyboard to normal (U.S. English) before you continue or you'll find that things don't work the way you expect them to. A single or double quote won't enter when you expect it to.

Marcel Gagné - Thu, 2005-01-13 15:08.
Categories:

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Great!!

Just here to say thanks to Marcel for this great trick and to Sjors for his Dutch variation!!
I'm a newbie with Linux and this was very important for me to find out.

Thanks again!!
Marlène

Marlène (not verified) - Sun, 2006-11-19 20:53.

Some variation

In my (Dutch) version of KDE there is no seperate "U.S. English w/deadkeys" layout. However you can add another "U.S. English" layout and then select "intl" from the variant dropdownbox.

Sjors (not verified) - Tue, 2006-08-15 07:23.

French accents

Hi,
For years, I have always being using ONLY a US keyboard...And I am French.
Why? Probably because I was facing so many problems in the past with software you cannot really use in a French version...
Granted, things are getting better...(not really sure ;-))
Now, I know the ALT+thatdarnedcode for ea. and every accent or cedilla.
And it is the way I work with...Windows...
For Linux, I cannot do the same thing. Why that?
I faced a LOT of problems with the locales. I had to recompile my kernel and stay with US only. Do you suggest to create a new "french user", or simply to get the trick to use my ALT+darnedcode. Is there a trick? Thank you

An - ymous (not verified) - Fri, 2006-03-31 08:24.

In later versions of KDE how set this up has changed.

If Marcel's instructions don't work and you have version 3.4.x of KDE try this
(Not being a writer I hope this makes sense):

Go to the KDE Control Center. Once the Control Center page appears, click on Regional and Accessibility. Once that appears, click on Keyboard Layout. Then when that page appears, click on the line saying - U.S. English (us) - that is in the middle top (more or less) of the page and make sure that line is high lighted (back ground behind the text is colored) if it isn't none of the below will work.

In the bottom right corner of the page there is a drop down box. The label to the left of that box is Layout Variant and in the drop down box it should say basic. Change that to intl and click on apply.

After that, in any new window or program you start things will work somewhat like what he describes above.

If you want to type the word don't , you have to press the ' key twice before you type the t . It should work the same for any other accent.

Keith Daniels - Wed, 2006-02-15 09:13.

cedilla does not work with latest KDE

I am using linux FC5 with (I think) KDE 3.5? and having set the US English international keyboard the ´ with c does not produce a cedilla it produces ć!!! All tthe other accents work fine however. Anyone know why?

OldJohnB (not verified) - Sat, 2006-09-16 20:35.

Re: Entering International Characters

Just a quick note for readers of this article. THe doc project at openoffice.org
has had a HOW-TO available since 2004/04/22 on this very subject.
See http://documentation.openoffice.org/HOW_TO/various_topics/Howto_special_char.pdf
for the latest edition.

G. Roderick Singlet - (not verified) - Fri, 2006-02-03 06:53.

Scharfes S or Beta on the Spanish keyboard

I am very happy with a Spanish keyboard, because it has almost all keys I need for Dutch, French, German and Spanish. The only letter missing is the Beta or Scharfes S letter for German (often written as double s). Now in window I had my ALT 225, but in KDE how do you do that without complicated keyboard switching?

An - ymous (not verified) - Sat, 2005-11-12 04:38.

Tilde with a Spanish keyboard

Spanish keyboard has the ñ key and so there is no tilde key like on US-keyboards. Now how would you produce a tilde like is used in Unix to indicate the home directory (very useful!).

An - ymous (not verified) - Sat, 2005-11-12 04:33.

Tilde with a Spanish keyboard

In a Spanish keyboard, you can get the tilde by pressing AltGr (Right Alt) + Ñ. Alternativelly, you can press AltGr (Right Alt) + ¡

Ariel Maidana (not verified) - Wed, 2006-02-15 07:16.

Tilde with ALT Gr 4

On a Spanish keyboard use ALT Gr + 4 to get the tilde

An - ymous (not verified) - Sat, 2005-11-12 04:57.

Setting up an international keyboard in xorg

Here's a short note on how to set up an international keyboard in linux.

An - ymous (not verified) - Sat, 2005-08-27 06:01.

This is awfully silly. If yo

This is awfully silly. If you just use a layout like U.S. English w/ISO9995-3, then it will work like a mac. Press right-alt + ; then e to get é, or alt+' a to get â, alt+s for ß, etc. It's very simple, and requires no switching of layouts.

An - ymous (not verified) - Thu, 2005-08-25 19:25.

What about non-Western characters?

Excellent and useful article. But what about non-Western characters, Central European for instance?

In KDE it's easy, because I can switch between various keyboard layouts, a method I find easier than US with dead keys even for French. But what about other window managers or wine/crossover?

What would be the easiest way to input non-Western Latin characters?

bilbophile (not verified) - Sun, 2005-07-31 00:24.

French accents

Hi
Sorry for my 0.10 cents worth. To deal with the french keyboard you're right it would be a pain. The A is at the Q ect. but there is an alternative, the french canadian keyboard has all the accents but on an american layout. It would be useless to most american but to somebody dealing with other languages at the ridiculous price they sell them, it might be worth getting.

Maurice Loran (not verified) - Tue, 2005-07-19 16:14.

Estoy de acuerdo contigo!!!!

Hace tiempo estoy buscando a vagabundo@sympatico.ca el vivia en canada y no me importaba si podia escribir bien con su teclado, ya que lo consideraba un gran amigo. Espero que las distintas culturas no sean un impedimento, para este bien intangible universal que podemos disfrutar gratuitamente, que es la amistad.
>Reciban un afectuoso saludo de una chilena.
Mi correo es guacolda1953@yahoo.es por si quieren recuparar la amistad

Elba Iquique Chile (not verified) - Fri, 2006-08-11 23:17.

Re: Entering International Characters

Dear Mr. Marcel Gagné I would like to thank you for this article.
I do, however, have a coupld of things to add if you don´t mind.

NOTE: when I say hit " I mean shift+´

If you want ö
then type " with o

the same goes for ë ï ä ÿ ü and "+Shift+Letter for caps etc
So you could do for French Noël
or say for German Männer and so on

if you want ´ or `
then just hit the respective key twice

while hitting the " key twice will leave you with an empty umlaut. ---¨
You need to hit " once and then the space bar.

I have not been able to figure out how to make the keyboard output the
German double s or known as szet such as would be in Fuss
If anyone knows how to get the double s with US-w/deadkeys,
it would be appreciated if you would not mind sharing it.

Best Regards,

Frederick Wessling (not verified) - Tue, 2005-07-19 10:35.

Szet

It is funny, I had to search for a long time to find how to do an umlaut (such as ö) but an szet (or Eszett or scharfes S) was intuitive after I thought about it.

An ß is made by hitting compose (Multi_key) followed by ss.

I found this intuitive because in German when ß is not available ss is to be used instead.

Nz17 (not verified) - Sun, 2005-12-11 07:20.

Fluxbox-Solution

I made a script xkb-office.sh

setxkbmap -rules xfree86 -model -pc104 -layout de -option "deadkeys"

and xkb-scripting.sh

setxkbmap -rules xfree86 -model -pc104 -layout de -option "nodeadkeys"

to switch between Office-mode and Programmer-mode.
Those can be easily integrated into the menu (~/.fluxbox/menu).
You could add hotkeys (~/.fluxbox/keys) for faster switching.

Stefan Wagner (not verified) - Thu, 2005-06-23 17:07.

dead key usage

You can just hit spacebar after a deadkey, to get the character to appear normally before a vowel or the letters c and y.

Viamó (not verified) - M - , 2005-04-18 22:00.

entering international characters

Single and double quotes may still be used as intended when followed by a blank.

An - ymous (not verified) - M - , 2005-04-18 11:08.

Keyboard layout

Have you tried the French Canadian keyboard ...practicly same layout as the american but with the accents.

Maurice (not verified) - Tue, 2005-02-15 19:35.

Good work!

Good work!

yes! (not verified) - Sun, 2005-01-30 18:34.

My five cents: enabeling UTF-8 in UNIX

Use fm command with an option
I don't remember now and path
to UTF-8 directory.
Then just enable the keys with
setxkeyboard...

Bye,
Mare

Mare (not verified) - Sat, 2005-01-22 10:08.

more funny characters to enter

pixelbeat (not verified) - Tue, 2005-01-18 13:38.

Keyboard icon

I tried setting up keyboard options but I don´t get flags. Instead I get grey icons without superimposed flags. Works OK but can´t tell which mode is active as both icons are the same. What module am I missing?

An - ymous (not verified) - Tue, 2005-01-18 10:47.

Yudit and export

Personnaly, when I must type a text with lot of letters which I can find on my french keyboard, I start yudit (www.yudit.org) and export my text in the good application at the end for formatting it.

En passant (not verified) - Tue, 2005-01-18 07:47.

alternative to add diacritical marks

If you have good unicode fonts, you can also add combining diacritical marks after the normal letter instead of precomposed letters.

testerus (not verified) - M - , 2005-01-17 22:13.

you said : «you can also add

you said : «you can also add combining diacritical marks after the normal letter»

how ?

An - ymous (not verified) - Tue, 2005-01-18 07:45.

combining letters

You'd have to edit your keymap in /etc/X11/xkb/symbols/pc/ and exchange
dead_acute with combining_acute, dead_grave with combining_grave, etc.
The advantage is that combining letters work with allmost all normal letters, while the amount of precomposed letters is limited.

testerus (not verified) - Tue, 2005-01-18 22:49.

graphical map of chars to be accessed with compose key?

Recently I found out about the power of composed characters. I used the xkb options of kxkb to define a compose key and found out that I am using file:///usr/X11R6/lib/X11/locale/en_US.UTF-8/Compose
What I am looking for is a small map that I could print out and put next to the computer to look up the sequences, but I could find none in the web.
Does anyone make or now of such a map?

testerus (not verified) - M - , 2005-01-17 22:00.

How to print or view a foreign keyboard

1. Use kdereview/viki. Its a graphical keyboard for KDE specially designed to help people with e.g. QWERTY keyboards who need to see e.g. a Bengali layout.

2. /usr/X11R6/bin/xkbprint $DISPLAY

An - ymous (not verified) - Wed, 2005-01-19 19:49.

GNOME: Simply press Ctrl+Shift+UnicodeID

Check out the Unicode Charts page for the IDs of the characters you want to insert.

Latin characters with accents are in Latin-1 Supplement. Also available are Miscelsaneous symbols (chess pieces, smilies, and other weird stuff) and Dingbats.

For example, the Greek letter mu (micro) is 0xB5: µ (Press Ctrl+Shift+B5)
Some more stuff: ☺, ☽, ☿, ☻, ☮, ♞ and so on...
No need for images to show smilies!

Simos (not verified) - M - , 2005-01-17 20:05.

You wrote: "The only catch

You wrote:

"The only catch is that you have to return the keyboard to normal (U.S. English) before you continue or you'll find that things don't work the way you expect them to. A single or double quote won't enter when you expect it to."

If you press space after the double or single quote (or any dead key) you get the that character. That way there is no need to switch keyboard layouts constantly.

An - ymous (not verified) - M - , 2005-01-17 12:57.

Or press deadkeys two times...

... which is easier (you don't have to seek the space bar).

An - ymous (not verified) - Tue, 2005-01-18 10:11.

Compose

As someone who spends more time than is proper writing code and scripts, I admire anybody who can put up with dead keys. Me, I use a compose key to get a selection of letters and symbols, such as ç å æ ß ž and of course é. I figured the 'windows' key had to be capable of doing _something_ useful :)

Upsides - normal text is unaltered, so no problems with accessing ticks or backticks or double quotes.

I can write my German homework (in abiword), or write in most West European languages, without difficulty - even the Icelandic þ and đ are available without having to remember character values (the only missing letters are some of the slavic variations, and Gaeilge (Irish) in the old script. Searching for foreign text in google is suddenly a whole lot easier when you can type in the correct letters!

Downsides -

The standard British keyboard doesn't come with a compose key definition, so you have to create your own map file if you want to use the compose key in the console.

For X (at least on unicode-free distros), you also have to edit the compose file in ${XLIB}/locale/*/Compose if you have want extra compose combinations, PLUS you have to define the compose key itself in .Xmodmap (I know, gnome 2.8 thinks it's better than me and will ignore ~/.Xmodmap). With a British setup you have to describe the € as a currency symbol rather than a Euro because iso-8859-1 refuses to admit the Euro can be displayed. Fun, fun, fun.

But if dead keys work for you, more power to your clavier M. Gagné.

Ken Moffat (not verified) - M - , 2005-01-17 11:55.

The standard British keyboard

The standard British keyboard doesn't come with a compose key definition
Why don't you contribute your map to x.org?

testerus (not verified) - M - , 2005-01-17 21:44.

How does one enter a "¿"?

Using the Windows equivalent, "US International" keyboard layout, I can easily enter an "¿" (which is used to open spanish questions), by presing the right side Alt key in cojuntion with the ? key. However, I have not been able to find how to enter it in Linux. I basically have to copy and paste it every time I want to use it (I forget the name of the KDE applet where I store it to make it easier). It would be nice if whoever maintains the Linux Keyboard layout woud add this character to the "U.S. English w/ deadkeys" layout.

An - ymous (not verified) - M - , 2005-01-17 08:28.

how to enter ¿

just enable the spanish keyboard layout, tehn try the shiftkye + 0 or one or tow keys to the right and you'll get the '¿'

Felipe (not verified) - Wed, 2005-03-30 18:44.

How does one enter a "¿"?

This "¿" is not a character used in English, but is a common Spanish character. On Mandrake 10.0 using KDE, I enabled the flag as mentioned in this article, and selected the supported languages as English and Spanish. In the bottom right of my screen, I see either the US flag with US or the flag of Spain with ES. If the flag is the US flag, I click it, and it converts to the Spanish flag. After moving to Spanish characters, to activate, I believe that
I believe the key is the Shift-0 key.

An - ymous (not verified) - Sun, 2005-01-23 23:31.

Re: How does one enter a "¿"?

I use Shift-RightAlt-? and Shift-RightAlt-!, respectively (RightAlt is usually
named "Alt Gr"). As I use a
Portuguese- Brazilian layout, I have no idea whether it works with
"US with deadkeys".

This can be fixed for any layout by editing the keyboard mappings, though it's
outside the scope of this discussion.

An - ymous (not verified) - Tue, 2005-01-18 10:24.

Have a look at this article a

Have a look at this article about XKB, it describes how to add custom key bindings to any keyboard layout in X.

An - ymous (not verified) - Tue, 2005-01-18 08:14.

Inverted ? and !

I use Ctrl-RightAlt ?? (have to press it twice) for ¿.
Ctrl-RightAlt !! gets me ¡ (inverted exclamation mark). This is on a US keyboard with deadkeys, under KDE 3.3 on Fedora Core 3. Took me a while to find it :-)

An - ymous (not verified) - M - , 2005-01-17 10:59.

These also work in Mandrake 10.1 without deadkeys

Just tested this on Mandrake 10.1 under KDE 3.3 with standard US keyboard layout and it works for me as advertised (¿ - ¡) without deadkeys.

An - ymous (not verified) - Sun, 2005-04-17 06:30.

Xandros options

I found a very useful set of Xandros options in the Control Centre:

Peripheral Devices => Keyboard Layout => Xkb Options:

Compose Key => one of Menu, Right Alt or Right Win-key enables compose for a single key, after which you can do the usual "'" + "e". After this single character, the keyboard reverts back to the usual behaviour.

Lars Erlandsen.

An - ymous (not verified) - M - , 2005-01-17 06:42.

Single-click, always-open special character box

For plain text and HTML formats, WISH Supernotepad 1.3 has a fairly convenient special-character box (if I do say so myself), with more than 60 characters including all common accented characters in capital and lower case. You can leave the box open beside the text window and single-click for instant insertion of special characters; the focus then automatically returns to the text window so you can continue typing. Not quite as fast as a keyboard shortcut, maybe, but you don't have to do any keyboard tricks at all. Requires Tcl and Tk 8.4 or greater; available for download (in a tar.gz archive with a simple installation script) from "Pa Penguin's Icebox" -- http://www.geocities.com/pa_mcclamrock

David McClamrock (not verified) - M - , 2005-01-17 05:33.

GNU/Linux keyboard layouts

KDE keyboard switching has been less than satisfactory in late releases (they had it at some point in time).

There are a number of keyboard layouts for linux, however, and an easy way to switch keyboards. For example, you can use ctrl/shift to switch between the english and hellenic keyboards by entering the following two lines in your .profile:

export LC_CTYPE=el_GR.UTF-8
setxkbmap us+el polytonic -option grp:ctrl_shift_toggle

This will enable UTF characters and set your keyboard to switch between the "us" english and hellenic "el" layout groups. You can leave the "polytonic" option out (a keyboard layout modifier for hellenic) or you can choose an alternate group switch code.

Dimitri (not verified) - M - , 2005-01-17 05:15.

a complete Hellenic

a complete Hellenic Polytonic HOWTO may be found in www.cap8.gr/tlgu

An - ymous (not verified) - Tue, 2005-10-11 13:01.

Caution with changing locales!

You are aware that changing the locale changes the encoding of the filenames of the harddisk too?
(Use convmv to change wrong encoded filenames.)

testerus (not verified) - M - , 2005-01-17 21:42.

Do you need root?

It doesn't work for me: the right-hand side of the window is greyed out and inactive.

Do you have to run kcontrol as root? If you do, it sounds like a design error to me. The old and utterly confusing way with xmodmap doesn't require root access.

Unfortunately I don't have root access on the box I'm using.

An - ymous (not verified) - M - , 2005-01-17 04:38.

Merci!!!

Et voilà! I can make accent marks now thanks to Monsieur Gagné! And it's *easy*, which it never was before in Linux...okay, I'm sold, I will subscribe to Tuxworld, since it appears to be what I have wanted for awhile - a "PC World" for Linux users, something with the kind of real-world help I need, and not information like how to migrate your enterprise network to Linux which is only useful if you run the IT department at General Motors.

One of the (very few) things I have missed about my Windows machine is the easy way to make foreign accent marks...my French friends were annoyed after I switched to Linux and could no longer do that.

AND I'm passing this on to all my fellow Linuxheads...as well as people I would *like* to convert to Linux (Hallelujah! Praise Lahhhh-nus!!!)

Frenchy (not verified) - Sat, 2005-01-15 18:41.