Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!rpi!tale From: tale@pawl.rpi.edu (David C Lawrence) Newsgroups: gnu.emacs Subject: Re: vt100 keypad codes on xemacs Message-ID: <1989Oct8.181628.6047@rpi.edu> Date: 8 Oct 89 18:16:28 GMT References: <1303@gmdzi.UUCP> <365@cs.columbia.edu> Organization: Rensselaer Polytechnic Institute, Troy NY Lines: 33 This is a frequently enough asked question that it should probably be addressed briefly here again. In <365@cs.columbia.edu> d-yang@cs.columbia.edu (David Yang) writes: DY> On the HDS-200, the up-arrow key is bound to the key sequence ESC [ A DY> I have tried (define-global-key "\e[A" 'previous-line) DY> which doesn't work-- emacs is still reading ESC [, doing the DY> (backward-paragraph) command, and then printing the letter A. DY> 1) Is the define-global-key okay? Depends on whether you happen to have that function doing the right thing. There is no define-global-key in GNU Emacs as distributed; perhaps you meant global-set-key? In order to access the rest of the binding, if you do have M-[ A correctly bound, Emacs needs to follow key prefixes to it. Since backward-paragraph is still bound to M-[ it can't do that. A global-unset-key of M-[ will enable Emacs to look further for the A, and hence the command to execute. DY> 2) If the problem is the same one as the vt100 question, DY> how does one get emacs to take the 3-character sequence? Which vt100 question? Anyway, you can (setq term-setup-hook 'enable-arrow-keys) in .emacs to have the arrow keys enabled after the term/$TERM.el file is loaded. See emacs/lisp/term/*.el and emacs/lisp/keypad.el for more information. Dave -- (setq mail '("tale@pawl.rpi.edu" "tale@itsgw.rpi.edu" "tale@rpitsmts.bitnet"))