Author Topic: lxterminal compose key sequences [SOLVED]  (Read 392 times)

Offline xr200

  • Full Member
  • ***
  • Posts: 96
lxterminal compose key sequences [SOLVED]
« on: November 26, 2012, 01:02:06 PM »
I'm running PCLinuxOS, KDE, and trying out lxterminal as my
terminal emulator.  I'm weaning myself off of xterm because
I can't use cut/paste with a right click, and I don't like
konsole because --geometry doesn't work.

Every so often, I have a desire to use some special character.

I know how to use xmodmap to map keys: For example, I have the
less than or equal to sign ≤ mapped to my metakey and <.  

I also know how to use vi and the Unicode number to display
special characters.  For example, here's a Yen ¥ sign that
I typed in using vim and the Unicode number.

That all works, but I'm trying to figure out the "compose"
key to work in lxterminal.  

 I've got my Compose key set to the left Windows key.

I have this environment variable set and exported:

export GTK_IM_MODULE=xim

/usr/share/doc/libX11/Compose/en_US.UTF-8.html

gives me a list of keys to use with the Compose key for various
characters, and they all seem to work as described.  For example,
I can print out type LEFT-WINDOWS E = to display the euro sign €.

But I'd like to add some that aren't in the existing available
list.  For example, I'd like to add π (unicode U03C0) so I could
just type LEFT-WINDOWS <p> instead of having to look up the
unicode number.

I googled and read the man page for compose and tried editting
$HOME/.XCompose to add an try for π, but it didn't work.  I thought
maybe I had entered my sequence incorrectly, so just as a sanity test
I temporarily moved all

   /usr/share/X11/locale/*/Compose
   
files to a temp directory, rebooted, and the existing compose sequences
still continued to work for me in lxterminal.   They did not work in
xterm or konsole.  So I'm guessing (perhaps incorrectly) that lxterminal
is compiled with a hard coded list of Compose keys, which is why I set
GTK_IM_MODULE=xim, but xterm and konsole are not.   I did run ldd for
lxterminal, konsole, and xterm, and they all are using libX11.

Can someone explain how I can create a new compose sequence for
special characters like π using lxterminal?  

xr200

>
« Last Edit: November 27, 2012, 08:23:33 AM by xr200 »

Offline xr200

  • Full Member
  • ***
  • Posts: 96
Re: lxterminal compose key sequences
« Reply #1 on: November 27, 2012, 08:23:01 AM »
I read the man page for Compose before looking into this.   
In my case (and it may be peculiar to me), the manual
page is incorrect.   In my case, $XCOMPOSEFILE and the
existence of $HOME/.XCompose are completely ignored by
lxterminal when using the compose key.

I eventually tried the brute force method of su-ing to
root and editting /usr/share/X11/locale/en_US.UTF-8/Compose.
I added a bunch of symbols and rebooted.   That was probably
overkill, restarting KDE should have been enough.

Whammo: magically the Compose key worked with my addtions.
So now I can pretty quickly type in characters like

≤ ⑧ π