[comp.sys.apollo] xterm PF1-PF4 keys

jab0396@cec1.wustl.edu (John A. Breen) (01/17/91)

This should be an easy one (and you'll have to pardon me if this has been
asked before).

Are the VT100 PF1-PF4 keys defined in the Apollo version of xterm?  If so,
where are they?  If not, can someone give me a hint how to define them
(or how to redefine any key for that matter).  I searched through every
manual I could find, and the only thing that comes close is a short
example on the xterm manual page (which I tried various modifications of
and could never get to work).

I don't think it's important, but I'm running on a DN3000, SR10.2, standard
Apollo X software, in "dm owns root" mode.

Thanks for any assistance.

John Breen		jab0396@cec1.wustl.edu		johnb@hobbes.mdc.com

weber_w@apollo.HP.COM (Walt Weber) (01/18/91)

In article <1991Jan16.232403.16478@cec1.wustl.edu>, John A. Breen writes:
|> Are the VT100 PF1-PF4 keys defined in the Apollo version of xterm?  If so,
|> where are they?  If not, can someone give me a hint how to define them
|> (or how to redefine any key for that matter).

John,

The manual "Using the X Window System on Apollo Workstations" is the place to
look for some of this -- it's a good summary, but not an exhaustive treatise
on X. The answer to your question is that you will need to use the client
"xmodmap" in order to simulate the keys which are not physically present on
the Apollo keyboard (PF1-PF4 as an example).

Since you are running in a "dm owns root" configuration, you'll need to take
into account the "keyboard.config" file which tells XApollo "this list of keys
doesn't exist for X, pass them through to the Apollo Display Manager". This is
important because you don't want to remap keys for xterm which XApollo will not
GIVE to xterm. See section 2.2.2 in the manual for a detailed discussion about
the /usr/lib/X11/keyboard/keyboard.config file.

Once you have picked a set of physical keys to emulate the PF keys, feed this
to xmodmap using the physical keycode and the keysym name (from the include
file /usr/include/X11/keysymdef.h).

Example - you want to make the "AGAIN" key map to PF1. Looking at the output
of "xmodmap -pk" you see that it is labeled "Redo" (which agrees with the entry
in the keyboard.config file), and it is keycode value 158. Looking at the
include file keysymdef.h, you see "#define XK_KP_F1 0xFF91" which is the entry
for "keypad function key 1" - also known as PF1. The xmodmap client will take
either a file entry or a command line remapping, so you could invoke it as
< xmodmap -e "keycode 158 = KP_F1" > (the quotes are required on the command
line) and the deed is done.

If you don't have a copy of the manual, you can get one by using the order
number "015213-A02". Hope that helps.

|> John Breen		jab0396@cec1.wustl.edu		johnb@hobbes.mdc.com

...walt...

Walt Weber                           Hewlett Packard Response Center
508-256-6600x8315                    Chelmsford, MA, USA
   "The power of accurate observation is commonly called cynicism
    by those who have not got it" -George Bernard Shaw

jab0396@cec1.wustl.edu (John A. Breen) (01/19/91)

In article <4f438fc0.20b6d@apollo.HP.COM> weber_w@apollo.hp.com writes:
>
>In article <1991Jan16.232403.16478@cec1.wustl.edu>, John A. Breen writes:
>|> Are the VT100 PF1-PF4 keys defined in the Apollo version of xterm?
>[...]
>
>[Use] "xmodmap" in order to simulate the keys which are not physically present
>on the Apollo keyboard (PF1-PF4 as an example).
>
>Since you are running in a "dm owns root" configuration, you'll need to take
>into account the "keyboard.config" file [...] 
>Looking at the
>include file keysymdef.h, you see "#define XK_KP_F1 0xFF91" which is the entry
>for "keypad function key 1" - also known as PF1[...].
>[Y]ou could invoke it as < xmodmap -e "keycode 158 = KP_F1" >
>[...]
>...walt...
>

Thanks for the assistance.  It worked just as you said.

However, since we're on the subject, I'm still curious why the approach I had
tried didn't work.  Basically, I attempted to bind (if that's the correct term)
the escape sequence character string to the function key (which is recognized
by X according to the keyboard.config file).  I used the example in the xterm
man page verbatim (except for changing the function key names to ones that
existed), as well as various modifications, but no response (BTW, I put this
in my .Xdefaults file; is that the wrong place?).

Although I don't need it now, I would like to know how to bind arbitrary
strings for future reference.


Thanks again.

John Breen		jab0396@cec1.wustl.edu		johnb@hobbes.mdc.com