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, 2021-01-13 15:08.
Categories:

Comment viewing options

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

Entering International Characters

You wrote : "A single or double quote won't enter when you expect it to." This is not correct. With the "U.S. English w/deadkeys" keyboard layout, the special characters like a single or double quote will be printed "over the next character you type". So if you only want a quote, you type a quote followed by a space.

Until now I've only used one program which gives problems with this "U.S. English w/deadkeys", (the eric3 python IDE), which Qscintilla as its editor backend, so it seems that Qscintilla does not support this keyboard layout.

Bart De Ceulaer (not verified) - Sat, 2021-01-15 14:08.

Keyboard shortcut to "quick-toggle" keyboard layout?

A great explanation. Finally I know how to handle that inconvenience! I did what you
adviced me and I find it works very well for me.

However, now my greed has awakened: I do not want to reach for the mouse every
so often, navigate it to the bottom right, and click on it, navigate back to my
document, click again to where I want to insert the special char, navigate down again
and back up, to continue touch-typing. It very much disturbs the rhythm of my
typing. As you said:

>> 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.

Is there an easy keyboard shortcut that would switch the keyboard layout without
taking the hands off the device?

Being KDE, there *should* be one (they do generally leave open the possibility to
configure it to your hearts comfort) -- but I can't find it.

Probably a good idea for a follow up "tips and tricks for desktop Linux" article?

An - ymous (not verified) - Fri, 2021-01-14 11:02.

Quick Toggle Keyboard Layout

You could try Alt + Ctrl + K.

An - ymous (not verified) - Sat, 2021-01-15 14:51.

Which is really close to Alt

Which is really close to Alt + Ctrl + L.

This is why i "lock" my desktop so many times a day.

An - ymoose (not verified) - Wed, 2021-01-19 06:49.

Changing the shortcut

Under KDE, you can go to:
Control Center => Regional & Accessibility =>Keyboard Shortcuts
In the Keyboard Shortcuts module => under the Shortcut Schemes tab (default) => under the Global Shortcuts tab (also default), scroll to the very bottom of the list and you'll find:
Keyboard => Switch to Next Keyboard Layout
Click it and customize it. (Ctrl+Shift+Space for me)

I also noticed, quite by accident, that (in Firefox, at least) Ctrl+Shift+(Unicode code point in hex) inserts that character. E.g. While holding Ctrl and Shift, typing 201c yields an opening double quote. Ctrl+Shift+(A1) => ¡, etc. “¡Yippee!

benizi (not verified) - Sun, 2020-07-17 13:47.

Great Article

As a Graphic Designer, this has been a sticking point for me. I know most of the alt+ codes, on Windows, but they don't always transfer properly to Linux. I really wish there was something like this in Gnome, but if there is, I haven't found it.

Guitarman (not verified) - Thu, 2021-01-13 19:38.

Gnome user? Gno problem!

You just need the Gnome keyboard switcher.

I can tell you what to do in Red Hat 9 (Gnome 2.2) or Fedora Core 3 (Gnome 2.8).

INSTALLING

  1. In either OS (and probably others using Gnome), right-click on your panel (system tool bar, or whatever you call it), and then:
    • On older Gnome versions (up to 2.2 at least), select "Add To Panel"->"Utility"->"Keyboard Layout Switcher".
    • On newer Gnomes (e.g. 2.8), select "Add To Panel", then type the three letters "key" (if you're using Gnome in English), and it'll jump ahead to the two keyboard-related applets. Select "Keyboard Indicator", and then click the "Add" button.

You should see a new applet appear on your panel, probably a flag of your home country, or else an abbreviation of the country's name.

SET UP -- Adding alternate layouts

  1. In Gnome 2.2, set up is very simple. Right-click on the new applet, and select Preferences. Click the "Add" button and select the alternate keyboard layout you want. I know the list can be daunting for some countries, but if you can't figure out which one you need, try them all until one works the way you expect. For the United States, the "US International" keyboard has the "dead keys" that Marcel Gagné mentions. In the preferences (Options tab), you can also set up a "hotkey" combination that will allow you to easily switch keyboards whenever you like. I like Shift-Shift_R (both shift keys at once).
  2. In Gnome 2.8, it's a bit more complicated. To add a new layout, right-click the applet and select "Open Keyboard Preferences" (confusing, but this is NOT the same as the simple "Preferences" menu item right below it!). Select the "Layouts" tab, and choose one of the "Available Layouts" from the list. For the US, there is a confusing array of choices. If you click the little arrow next to "U.S. English", "International (with dead keys)" will be revealed. But below that, there is also "U.S. English w/dead keys". Maybe they both work--perhaps you can try and let us know! Anyway, select one of them, and click "Add".
    • Now, click the "Layout Options" tab to discover a new, even more confusing tree of options. You'd never expect it, but they're suddenly calling layouts "groups", and if you click the arrow next to "Group Shift/Lock behavior", you'll the possible key combinations you can use to easily switch between layouts. I like "Both Shift keys together change group". I rarely hit both by mistake, and I can always glance at my panel to see what group I'm in.
    • If you're the tinkering type, you can also right-click the applet and select "Preferences" to see some more options (again "group" means "layout"). Lastly, you can right-click the applet and select "Plugins", but no plugins are installed with Fedora Core 3. I use the "highlight" plugin to make the applet "stand out" on the panel. Not all that useful, really, but you can download a small set of plugins here:
      http://sourceforge.net/project/showfiles.php
    • That package supposed to include a flag plugin, which doesn't work for me (I use English, German and Italian layouts, and flags--which come with Gnome 2.2--are a really handy indicator for different languages).

FYI, you should have this applet as part of the gnome-applets package (Gnome 2.2 and 2.8 both, probably most other versions, going way back).

Hope that helps.

Eric Lambart (not verified) - Thu, 2021-01-13 23:01.