sos@spsd4330a.erim.org (Tim Sos) (02/01/91)
I am attempting to use the keypad on ncd15 xterminals (and others) for
triggering emacs commands. I know how to get key-maps setup for
vt100's and other terminals and have had no problems with this. I
have 2 key-maps (one for ^[[ sequences and one for ^[O sequences).
My problem is this:
On GNU Emacs 18.55.23 - Sun OS ver 4.0.3. Under Xwindows (and Motif)
Method A:
If you start xemacs from your .Xclients (or from a xterm), you get a new
window and the keypad is left mapped to the the face value of the keys,
i.e. '1', '2', '3', ....
Method B:
If you start xemacs with from an xterm WITH 'unsetenv DISPLAY', you get
a emacs in your current xterm window and the keypad is now mapped into the
alternate (vt100 like) codes, i.e., 'ESC O q', ESC O r', ...
The alternate codes are used in key-maps in the .emacs file.
WHY ARE THEY DIFFERENT???
O.K. I can figure out that the xterm has the TERMCAP set and things are
great. But how does the xemacs get keyboard translations? How do I
get xemacs to tell the terminal to use the alternate codes? (It is easy
to do, emacs just send the terminal a couple of chars to trun it on and
off at the correct times)
It is even more interesting the the function keys (f1, f2, f3...) also
behave different between method A and B
(example f1: method A 'ESC [ 2 2 4 z' method B 'ESC [ 1 1 ~' )
I can handle having 2 maps, one for each method (for the f1,f2,f3.. keys);
however, I can not 'get around' xemacs not turning on the keypad
alternate char set in method A.
(1) Is there some way to specify the termcap for the method A xemacs?
(the rumor is that it does NOT use termcaps since it is X-window
based and gets the X events) This would make the key codes the
same (at least the f1, f2, .. keys).
(2) What tells xemacs there is a keypad to worry about
with method A (as a seperate x-window)?
Thank you for any help!
Tim Sos
sos@spsd4330a.erim.org
--
+--------------------------------------------------+-------------------------+
| Garrett "Tim" Sos sos@spsd4330a.erim.org | My opinions are my own |
| ERIM, P.O. Box 8618, SPSD Department | and do not represent |
| Ann Arbor, MI 48107-8618, 313-994-1200 Ext. 2848 | ERIM in any way. |
+--------------------------------------------------+-------------------------+