Newsgroups: comp.windows.x.motif
Path: utzoo!utgpu!watserv1!watdragon!watsol.waterloo.edu!tbray
From: tbray@watsol.waterloo.edu (Tim Bray)
Subject: osf Keysyms and a mild flame
Message-ID: <1990Dec14.145313.5210@watdragon.waterloo.edu>
Sender: daemon@watdragon.waterloo.edu (Owner of Many System Processes)
Organization: University of Waterloo
Date: Fri, 14 Dec 90 14:53:13 GMT
Lines: 46

A few days back, I posted a query to this august form.  To summarize,
after installing motif 1.1, my applications broke because they couldn't
find the new 'osf*' motif keysyms.  Why, I wondered.  No response from
the newsgroup.

I looked at the VirtualBindings motif man page, (excerpted below) and
it seemed to say that the .motifbind needed to be set up, or some such.
Doing that produced no results. 

Well, plowing through Xm source, then Xt source, then Xlib (!) source
revealed that widget Init calls were calling XtParseTranslations which was
eventually calling XStringToKeysym with something like "osfUp", and Xlib was
saying "Huh?" and Xt was saying "bletch" and my Motif applications were
without benefit of keystrokes.

The SOLUTION:

Further perusal of the Xlib source revealed that I was missing the file
/usr/lib/X11/XKeysymDB.  Somehow it hadn't got installed when installing
motif.  Dropped it in and everything was fine.

I must say that it is mildly irritating that nobody from OSF bothered
to respond to the original posting, when the problem is totally obvious once
one understands how XStringToKeysym really works (I didn't want to, but I
do now).  I am rather more heavily pissed that nowhere in the motif 
documentation (at least in a form accessible to grep(1)) is there any
info on how to make the osf* keysyms visible in the first place so that
the virtual bindings can start to take effect.

In this connection, the excerpt below from the VirtualBindings man page
is rather misleading, and should be fixed, I think:

>        Bindings for osf Keysyms
>          Keysym strings that begin with "osf" are not part of the X
>          server's keyboard mapping.  Instead, these keysyms are
>          produced on the client side at run time and are used by the
>          translation manager when the server delivers an actual key
>          event.  A mapping is maintained between "osf" keysyms and
>          actual keysyms.  This mapping is based on information
>          obtained from one of the following sources, listed in order
> (several sources listed; no mention of /usr/lib/X11/XKeysymDB)

In fact, as part of translation SETUP, the osf* keysyms are fed, by
name, straight to the Xlib code, which therefore has to know about them.

Cheers, Tim Bray (tbray@watsol.waterloo.edu)
