[ltp] Typing French Characters on English Keyboard

morpheus linux-thinkpad@linux-thinkpad.org
Thu, 16 Dec 2004 13:55:53 -0500

> 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.
Ok, sorry to confuse you...my internal laptop keyboard is English
layout, my external USB keyboard is Japanese layout.  I have no problem
to switch between the two using:
# setxkbmap -model microsoftmult -layout jp -variant jp106
setxkbmap -model microsoftmult -layout us -variant intl

My LOCALE is ja_JP.UTF8 and my LANG is en_US.UTF8

> xmodmap -e 'keycode 109 =3D Multi_key'
Okay, what I did was edit /etc/X11/xkb/symbols/jp
and /etc/X11/xkb/symbols/us, and changed=20
    key <RCTL> { [  Control_R ] };
    key <RCTL> { [  Multi_key ] };

I confirmed with xev that when I press right control, I get:
KeyPress event, serial 30, synthetic NO, window 0x5400001,
    root 0x5e, subw 0x0, time 56947349, (995,-667), root:(1002,341),
    state 0x0, keycode 109 (keysym 0xff20, Multi_key), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

And now it works!! =C3=A9=C3=A1=C3=A8=C3=A0=C3=AB=C3=AA=C3=A7
Now all I have to do is remember how to spell all those words :-(


> (makes right Ctrl key the Multi_key)
> Multi_key + ' + e =3D =C3=A9 (e with an acute accent)
> Multi_key + ` + e =3D =C3=A8 (e with a grave accent)
> Multi_key + " + e =3D =C3=AB (e with an umlaut)
> Multi_key + ^ + e =3D =C3=AA (e with a circumflex)
> Those combinations work for all the vowels, upper and lowercase.
> Multi_key + , + c =3D =C3=A7 (c with cedilla)
> Multi_key + a + e =3D =C3=A6 (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
> --=20
> ...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