Carl Johnson wrote:
> Bob Proulx writes:
> > That seemed to have been the best recommendation.  So I went off and
> > set up:
> >   setxkbmap -rules evdev -model evdev -layout us -variant altgr-intl
> > ...
> 
> I just have a Compose (AltGr) key set with LANG=en_US.UTF-8 and I can
> type them by using the underscore as:
> ā = Compose _ a
> ē = Compose _ e
> ī = Compose _ i
> ō = Compose _ o
> ū = Compose _ u

That looks promising!  But I must not have my compose key set up
correctly.  I couldn't get that to work.  But I did eventually.  Here
is what I did.  I had done this:

  dpkg-reconfigure keyboard-configuration

That asks me what I want set up for AltGr and Compose.  I selected
Right Alt and Right Control.  That resulted in this configuration in
the /etc/default/keyboard file.  (Can anyone explain to me what "lv3"
means in this?  The rest is obvious.)

  XKBOPTIONS="lv3:ralt_switch,compose:rctrl,terminate:ctrl_alt_bksp"

But it didn't seem to have any effect.  At least not on the fly.  I
think it should call setxkbmap but doesn't.  I didn't want to restart
my X session yet.  More searching led me to this configuration.

  setxkbmap -model pc104 -layout us -option compose:rctrl

That set up my Compose key.  I can now build up Latin macron
characters as well as accented characters.  Yay!

The choice of Right Alt and Right Control might be most general as all
PC keyboards have those keys.  My laptop does not have a right logo
key.  It does have a menu key.  Other keyboards have a Right Logo key.
Here are other possibilities.

  setxkbmap -model pc104 -layout us -option compose:rctrl
  setxkbmap -model pc104 -layout us -option compose:menu
  setxkbmap -model pc104 -layout us -option compose:rwin

It also lost the AltGr key.  I am not sure that is important.  But
some experimentation (no I don't know what I am doing, if you find
this in the archive years from now this is just by guessing) led me to
this which seems to successfully give me both.  And of course I wan
tthe terminate:ctrl_alt_bksp to kill my X session because that is what
I want.

  setxkbmap -model pc104 -layout us -variant altgr-intl -option compose:rctrl 
-option terminate:ctrl_alt_bksp

With that I get *both* the Compose key and the AltGr key.  Both work.
I can either build the characters with Compose ' e for é or I can use
the AltGr e for é.  Yay!

I dropped the "-rules evdev" since that didn't seem to make any
difference for me.  But it could be because I had already run it
once.  It refers to the /usr/share/X11/xkb/keycodes/evdev file.

> You can look up those compose combinations in the file
> /usr/local/lib/X11/locale/en_US.UTF-8/Compose.

Thanks for that hint!  You might have it in /usr/local on your system
but the standard file location is:

  /usr/share/X11/locale/en_US.UTF-8/Compose

That lists many useful combinations.  Searching for a desired
character cut and pasted into search yields the input keys needed to
produce it.  Very useful.

Except for understanding what "lv3" means in the above I think this
fixes me, er the latin teacher, up pretty well.  Unless there are
improvements and explanations which are always greatfully accepted.

Thanks for all of the hints!

Bob

Attachment: signature.asc
Description: Digital signature

Reply via email to