[comp.windows.x] help needed mapping foreign keyboards

ira@zorch.SF-Bay.ORG (Ira Chayut) (06/06/91)

The following is being posted for a friend, please reply directly, if possible.
I will be happy, however, to forward responses that come my way.

							Ira
----------------------------------------------------------------------------
I've been working on some keyboard mapping things for a client.  They've got
a variety of supported keyboards for different languages. All of these
keyboards (well, almost all; I'm not couting the Turkish) are for languages
supported by ISO 8859-1.  As the number of characters to be generated by the
keyboard expands beyond the number of keys, certain characters can only be
generated by holding the ALT key down at the same time.

For example, on the Spanish keyboard, the [{]} characters are selected by
the same keycap as on the US keyboard, but only if the ALT key is held down.

My problem is that I haven't figured out how to map these sequences with an
ALT-key modifier with xmodmap so that the clients see them.  Paraphrasing
from the X protocol document:

	For any keycode, the first keysym in the list should normally be ...
	a KeyPress when no modifier keys are down.  The second keysym
	would normally be chosen when the Shift key is down. ... No
	interpretation of keysyms beyond the first two is suggested here.

It's that last line that worries me, and it seems to be the way the stock
programs behave: so far, I haven't gotten xterm or anything else to pick the
appropriate character for, say, the ALT-[ sequence as noted above.

I'm hoping to be lucky, and there's some useful thing to do that I just
don't know about; so before I get in and spend gobs of time on this (it's
only a small part of the contract I am working on, most of the rest of which
isn't X-related), how do people address this issue?  I presume vendors must
be supporting non-US keyboards under X without great trouble?  Or is this a
rash assumption?

While I've got your attention, how _is_ the support for character sets
other than 8859-1 coming along?  I see things in xlib, like the empty code
block in XKeyBind.c/XConvertCase():  /*XXX do all other sets */
that let me believe it isn't well supported under x11r4.  Is this due
for x11r5?

I've been without net access to the last year or so, so replies by email
would be appreciated.  

Mats Wichmann
alruna!mats@unisoft.com		<- there's been some confusion with VERY old
				   maps routing my mail to a former upstream
				   site which no longer exists.  If this is
				   a problem, try the direct route:
					...uunet!unisoft!alruna!mats