From: dbrooks@osf.org (David Brooks)
Subject: Re: How to use the ALT-key to produce 8-Bit Chars in xterm (X11R4)
Organization: Open Software Foundation
Date: Wed, 16 Dec 1992 19:53:40 GMT

After much experimentation, I came up with this set of xmodmap commands.
It's still not quite right.  It works on my HP keyboard, with the
standard HP server that has its own idea of what the extend-char
character set should be (for example, extend-c is c-cedilla, even though
there's no c-cedilla engraving).

What this gets me is the ability to use xterm, emacs and Xt-based
programs without long lists of bindings for any of them.  In Xt
programs, I use the left meta-key for accelerators, and the right
meta-key for 8-bit insertion.  Or is it the other way round?  It's still
not quite right: meta-> and meta-< don't work.

In emacs, set meta-flag true, and use the ^Q prefix to insert 8-bit
characters.  In xterm, eightBitInput is true.

And make sure your fonts match your intentions.
--------
! Here's what this achieves:
! xterm can use right or left
! emacs uses right
! toolkit uses left for Meta translations, right for input

clear mod1
clear mod2

! These are keycodes for the HP 46021A
keycode 10 = Mode_switch Meta_R
keycode 11 = Meta_L
keycode 54 = VoidSymbol
add mod1 = Meta_L Meta_R
add mod2 = Mode_switch

! Undo the HP keyboard 8-bit mapping
keysym A = a A aacute
keysym B = b B acircumflex
keysym C = c C atilde
keysym D = d D adiaeresis
keysym E = e E aring
keysym F = f F ae
keysym G = g G ccedilla
keysym H = h H egrave
keysym I = i I eacute
keysym J = j J ecircumflex
keysym K = k K ediaeresis
keysym L = l L igrave
keysym M = m M iacute
keysym N = n N icircumflex
keysym O = o O idiaeresis
keysym P = p P eth
keysym Q = q Q ntilde
keysym R = r R ograve
keysym S = s S oacute
keysym T = t T ocircumflex
keysym U = u U otilde
keysym V = v V odiaeresis
keysym W = w W division multiply
keysym X = x X oslash
keysym Y = y Y ugrave
keysym Z = z Z uacute
keysym bracketleft = bracketleft braceleft Ucircumflex ucircumflex
keysym backslash = backslash bar Udiaeresis udiaeresis
keysym bracketright = bracketright braceright Yacute yacute

keysym grave = grave asciitilde agrave thorn
keysym 1 = 1 exclam plusminus exclamdown
keysym 2 = 2 at twosuperior Agrave
keysym 3 = 3 numbersign threesuperior sterling
keysym 4 = 4 dollar acute currency
keysym 5 = 5 percent mu yen
keysym 6 = 6 asciicircum paragraph THORN
keysym 7 = 7 ampersand periodcentered brokenbar
keysym 8 = 8 asterisk cedilla ordfeminine
keysym 9 = 9 parenleft onesuperior diaeresis
keysym 0 = 0 parenright degree copyright
keysym minus = minus underscore ssharp ydiaeresis
keysym equal = equal plus onehalf guillemotleft
keysym semicolon = semicolon colon guillemotright masculine
keysym apostrophe = apostrophe quotedbl section cent
keysym comma = comma less notsign onequarter
keysym period = period greater registered threequarters
keysym slash = slash question macron questiondown

! These are specific to the HP keyboard...
! Reset/Break added as Escape (easy to swipe it).
keycode 15 = Escape

! Print/Enter becomes DEL (easier then shift-esc, and no vuewm menu clash)
keycode 87 = Delete

! Disable Caps key.  Generating void is an optional extra; I'd rather not.
clear lock
!keycode 55 = VoidSymbol

-- 
David Brooks					dbrooks@osf.org
Open Software Foundation			uunet!osf.org!dbrooks
Allberall und ewig blauen licht die Fernen!  Ewig... ewig... ewig...