[comp.emacs] X Gnu on an RT not seeing all keys

galvin@yale.UUCP (Peter Galvin) (06/23/87)

Well, I've got Gnu 18.45 running under Xwindows on our IBM RT workstations
(running BSD 4.2),
but I still have a minor problem: All the "abnormal" keys
on the RT keyboard are being "ignored" by emacs except for the arrow
keys.  Abnormal keys are the functions, the specials (home, end, 
insert, pageup, pagedown), and the numeric keypad.  The arrow keys
are pre-assigned emacs commands (uparrow generates ctrl-P).

Doing a help C command and pressing these keys shows nothing (that is,
it's as if I hadn't pressed a key), which makes it hard to bind them
to emacs functions.  I've even tried setting different terminal types
(ibmapa16 and vt100) to see if that would help.  It didn't.
If I invoke emacs with the -nw switch, it runs as
it should in the window I give the command in, and sees all the function keys.
I assume then that the problem is in the X code in gnu, but haven't
made any progress from there.

					--Pete

rlk@.COM (Robert Krawitz) (06/23/87)

In article <12774@yale-celray.yale.UUCP> galvin@yale.UUCP (Peter Galvin) writes:
]Well, I've got Gnu 18.45 running under Xwindows on our IBM RT workstations
](running BSD 4.2),
]but I still have a minor problem: All the "abnormal" keys
]on the RT keyboard are being "ignored" by emacs except for the arrow
]keys.  Abnormal keys are the functions, the specials (home, end, 
]insert, pageup, pagedown), and the numeric keypad.  The arrow keys
]are pre-assigned emacs commands (uparrow generates ctrl-P).

It's because the mapping for these keys is a null string.  I special
cased the arrow keys because a lot of people depend on them, but to
bind any of the function keys you have to have a .Xkeymap file (see
keycomp(1) for details).  You may bind any keys as you wish.

Once you have a .Xkeymap file, you can use the functions x-rebind-key
and x-rebind-keys to rebind keys specifically for emacs.  You can't
use these functions without a .Xkeymap file due to an "undocumented
feature" (read: bug) in X.

]If I invoke emacs with the -nw switch, it runs as
]it should in the window I give the command in, and sees all the function keys.
]I assume then that the problem is in the X code in gnu, but haven't
]made any progress from there.

Xterm does bind the function keys locally for its own purposes, by
means of a mechanism different from that used by x-rebind-key.
X-rebind-key uses facilities provided by X to rebind keymappings,
whereas xterm has an internal table of mappings that it uses.  GNU
Emacs doesn't bind the function keys because there is no defined
meaning for function keys across machines (the VAXstation keyboard is
different from the RT keyboard is different from the Sun keyboard).

Robert^Z