From: smr@hitkw14.pki-nbg.philips.de (S.Riehm)
Newsgroups: fj.mail-lists.x-window
Subject: xterm key translations cause xterm death
Date: 2 Sep 92 14:24:07 GMT
Distribution: fj
Organization: Workstation Div., Supermicro Systems Group, Sony Corporation

Date: 2 Sep 92 09:35:38 GMT
Message-Id: <smr.715426538@hitkw14>
Newsgroups: comp.windows.x

I have a problem with xterm's key translations.. I am trying to make
typing international characters somewhat easier by defining a compose
sequence. My keyboard doesn't have a compose key, so I am using the
End key instead ( hey I never use it for anything else ).
The general concept is:
	type compose key ( in this case End )
	type a modifier: ie: " for umlauts, ' for accent, ^ for
	    circumflex etc
	type a character to have the special modification.

	so <End " e> would produce an e with umlauts ( here is one k )
	and <End ' e> would produce an e with an accent ( like this i )

The problems are:
	1> sometimes after typing several international characters,
	    xterm crashes, and simply terminates. I guess this could
	    be due to having to constantly change the translation
	    table back and forth and eventually getting confused.
	2> I want to be able to exit the compose sequence if a
	    non-mapped key is typed, however this doesn't work,
	    because as soon as I type shift, it thinks that shift is
	    not mapped and exits the compose sequence.
	    ( see the last entry in the composeKeymap table, it doesn't
	    work, so currently I have that line commented out, so I
	    can use the rest of my translations )

I am open to any other suggestions of interesting and useful ways to
enter international characters.

Other than the faults above, this scheme works fine.

here are my translations ( direct from xrdb ):
( The fontsKeymap translations left in for general interest, but don't
generally effect the character sets used. )
--- cut here ---
XTerm*VT100.Translations:	#override !<Key>End: keymap(compose)
XTerm*VT100.apostropheKeymap.translations:\
	!<Key>Home: string("#compose quote") \n\
	!<Key>End: keymap(None) \n\
	!Shift <Key>a: string(0xc1) keymap(None) \n\
	!Shift <Key>e: string(0xc9) keymap(None) \n\
	!Shift <Key>o: string(0xd3) keymap(None) \n\
	!Shift <Key>u: string(0xda) keymap(None) \n\
	!<Key>a: string(0xe1) keymap(None) \n\
	!<Key>e: string(0xe9) keymap(None) \n\
	!<Key>o: string(0xf3) keymap(None) \n\
	!<Key>u: string(0xfa) keymap(None) \n\
	<Key>: bell(50) keymap(None)
XTerm*VT100.circumflexKeymap.translations:\
	!<Key>Home: string("#compose circumflex") \n\
	!<Key>End: keymap(None) \n\
	!Shift <Key>a: string(0xc2) keymap(None) \n\
	!Shift <Key>e: string(0xca) keymap(None) \n\
	!Shift <Key>o: string(0xd4) keymap(None) \n\
	!Shift <Key>u: string(0xdb) keymap(None) \n\
	!<Key>a: string(0xe2) keymap(None) \n\
	!<Key>e: string(0xea) keymap(None) \n\
	!<Key>o: string(0xf4) keymap(None) \n\
	!<Key>u: string(0xfb) keymap(None) \n\
	<Key>: bell(50) keymap(None)
XTerm*VT100.composeKeymap.translations:\
	!<Key>End: keymap(None) \n\
	!<Key>Home: string("#compose") \n\
	!Shift <Key>apostrophe:	keymap(umlaut) \n\
	!<Key>grave:	keymap(grave) \n\
	!<Key>apostrophe:	keymap(apostrophe) \n\
	!Shift <Key>6:	keymap(circumflex) \n\
	!Shift <Key>grave:	keymap(tilda) \n\
	!Shift <Key>c: string(0xc7) keymap(None) \n\
	!<Key>f:	keymap(fonts) \n\
	!<Key>c: string(0xe7) keymap(None) \n\
	!<Key>slash: string(0xf7) keymap(None) \n\
	!<Key>s: string(0xdf) keymap(None) \n\
	<Key>: bell(50) keymap(None)
XTerm*VT100.fontsKeymap.translations:\
	!<Key>End: keymap(None) \n\
	!<Key>Home: string("#fonts") \n\
	!<Key>1: set-vt-font(1) keymap(None) \n\
	!<Key>2: set-vt-font(2) keymap(None) \n\
	!<Key>3: set-vt-font(3) keymap(None) \n\
	!<Key>4: set-vt-font(4) keymap(None) \n\
	!<Key>d: set-vt-font(d) keymap(None) \n\
	<Key>: bell(50) keymap(None)
XTerm*VT100.graveKeymap.translations:\
	!<Key>Home: string("#compose grave") \n\
	!<Key>End: keymap(None) \n\
	!Shift <Key>a: string(0xc0) keymap(None) \n\
	!Shift <Key>e: string(0xc8) keymap(None) \n\
	!Shift <Key>o: string(0xd2) keymap(None) \n\
	!Shift <Key>u: string(0xd9) keymap(None) \n\
	!<Key>a: string(0xe0) keymap(None) \n\
	!<Key>e: string(0xe8) keymap(None) \n\
	!<Key>o: string(0xf2) keymap(None) \n\
	!<Key>u: string(0xf9) keymap(None) \n\
	<Key>: bell(50) keymap(None)
XTerm*VT100.tildaKeymap.translations:\
	!<Key>Home: string("#compose tilda") \n\
	!<Key>End: keymap(None) \n\
	!Shift <Key>a: string(0xc3) keymap(None) \n\
	!Shift <Key>e: string(0xca) keymap(None) \n\
	!Shift <Key>o: string(0xd5) keymap(None) \n\
	!Shift <Key>u: string(0xdb) keymap(None) \n\
	!<Key>a: string(0xe3) keymap(None) \n\
	!<Key>e: string(0xea) keymap(None) \n\
	!<Key>o: string(0xf5) keymap(None) \n\
	!<Key>u: string(0xfb) keymap(None) \n\
	<Key>: bell(50) keymap(None)
XTerm*VT100.umlautKeymap.translations:\
	!<Key>Home: string("#compose umlaut") \n\
	!<Key>End: keymap(None) \n\
	!Shift <Key>a: string(0xc4) keymap(None) \n\
	!Shift <Key>e: string(0xcb) keymap(None) \n\
	!Shift <Key>o: string(0xd6) keymap(None) \n\
	!Shift <Key>u: string(0xdc) keymap(None) \n\
	!<Key>a: string(0xe4) keymap(None) \n\
	!<Key>e: string(0xeb) keymap(None) \n\
	!<Key>o: string(0xf6) keymap(None) \n\
	!<Key>u: string(0xfc) keymap(None) \n\
	<Key>: bell(50) keymap(None)
--- cut here ---