[ltp] Typing French Characters on English Keyboard

Matt Graham linux-thinkpad@linux-thinkpad.org
Thu, 16 Dec 2004 12:59:16 -0500


On Thursday 16 December 2004 12:37, after a long battle with technology,=20
morpheus wrote:
> I'm trying to learn French, and I'd like to be able to type the
> accented characters on my English keyboard.  I've tried changing the
> keyboard layout, but that just re-maps the keys so they don't match
> what's on the keyboard.  Is there a way to do this while retaining my
> keyboard layout (which is Japanese by the way).

OK, you say your keyboard is English, and then you say your keyboard=20
layout is Japanese.  Which is it?  What's $LANG?  Precision is=20
important.

> Should I just register lots of keyboard shortcuts using CTRL-ALT=20
> combos?=20

Hell no.  Use the Multi_key.  If LANG eq "en_US", then you're in the=20
iso-8859-1 locale, and you can do something like so:

xmodmap -e 'keycode 109 =3D Multi_key'
(makes right Ctrl key the Multi_key)
Multi_key + ' + e =3D =E9 (e with an acute accent)
Multi_key + ` + e =3D =E8 (e with a grave accent)
Multi_key + " + e =3D =EB (e with an umlaut)
Multi_key + ^ + e =3D =EA (e with a circumflex)

Those combinations work for all the vowels, upper and lowercase.

Multi_key + , + c =3D =E7 (c with cedilla)
Multi_key + a + e =3D =E6 (ae-ligature)

All the Multi_key combinations you can use are documented in=20
/usr/X11R6/lib/X11/locale/$LOCALE/Compose .  All you need to do is=20
xmodmap an otherwise useless key to Multi_key so that you can use them. =20
And make sure that LANG is set; if LANG eq "C" then it won't work since=20
there aren't any Compose sequences defined for the C locale.  HTH, if=20
you need more about Multi_key ,=20
http://groups.google.com/advanced_group_search , keyword Multi_key ,=20
groups comp.os.linux.* . =20

=2D-=20
=2E..In Hong Kong action movies, they don't have Hollywood Guns with
infinite bullet supplies.  Instead, they have Hong Kong Pants(tm) which
hold an infinite supply of loaded pistols.  --M. Sphar, the Monastery
There is no Darkness in Eternity/But only Light too dim for us to see