[comp.windows.x] Xt translation bindings

davis@b11.ingr.com (Chris Davis) (11/11/89)

I am quite familiar with Xlib programming in general, but am very 
naive with respect to toolkits, and in this case, Xt.  I was fiddling with
a program called xtartan that I ported to our system that makes use of
"translation bindings" for interactive commands.  I must be missing 
something because I have not been successful in getting the interactive
commands to function.  Below is an excerpt from the man page that 
describes the "translation bindings" and their functions:

          The standard translation bindings are:
          Ctrl<Key>C : exit()\n\
             :<Key>? : help()\n\
             :<Key>h : help()\n\
             :<Key>n : next()\n\
             :<Key>N : next() name()\n\
             :<Key>p : previous()\n\
             :<Key>P : previous() name()\n\
             :<Key>q : exit()\n\
             :<Key>t : info()\n\
             :<Key>* : scale(+1)\n\
             :<Key>/ : scale(-1)\n\
             :<Key>+ : lineWidth(+1)\n\
             :<Key>- : lineWidth(-1)\n\

How do I apply this once the client is running, i.e., how do I interpret
this description?  Any info on this would be greatly appreciated.

Christopher C. Davis         |   "Music is the expression of one's identity,
UUCP:     ..uunet!ingr!davis |   if you conform, then you are forever doomed
Internet: davis@ingr.com     |   to follow in blind faith."

swick@ATHENA.MIT.EDU (Ralph R. Swick) (11/11/89)

> How do I apply this once the client is running, i.e., how do I interpret
> this description?

Read Appendix B of "X Toolkit Intrinsics - C Language Bindings".
The simplest interpretation is the correct one; e.g. "Ctrl<Key>C: exit()"
means 'call the "exit" function (really "action") when a key containing
a keysym of C in its keyboard mapping is pressed simultaneously with the
key setting the control modifier bit'.  ":<Key>N: next() name()" means
'call the "next" function followed by the "name" function when a key
is pressed whose keycode maps to the keysym C using precisely the Shift
and Lock modifier state as specified in the event'.