Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!ames!ptsfa!ihnp4!inuxc!iuvax!pur-ee!j.cc.purdue.edu!nwd From: nwd@j.cc.purdue.edu (Daniel Lawrence) Newsgroups: comp.emacs Subject: Re: VT100 keypad and cursor keys - (nf) Message-ID: <4917@j.cc.purdue.edu> Date: Tue, 4-Aug-87 11:03:50 EDT Article-I.D.: j.4917 Posted: Tue Aug 4 11:03:50 1987 Date-Received: Thu, 6-Aug-87 04:25:30 EDT References: <37400001@ztivax.UUCP> Reply-To: nwd@j.cc.purdue.edu.UUCP (Daniel Lawrence) Organization: Purdue University Lines: 46 Summary: VT100 escape sequences In article <37400001@ztivax.UUCP> i111@ztivax.UUCP writes: >Does anybody know, how to bind the VT100 arrow keys and perhaps the >keypad keys into MicroEmacs 3.8i? >Now I can't rebind these keys, because they are sending escape >sequences with 3 characters, and Emacs can obviously handle only up >to 2 characters. >Siemens AG >ZTI Inf 112 >Otto-Hahn-Ring 6 >D 8000 Muenchen 83 >West-Germany This problem has come up so often that I wanted to pose a couple of possible solutions. For MicroEMACS 3.8l and earlier, if you have a set of functions keys you would like to bind... bind-to-key execute-macro-30 M-[ 30 store-macro set %eseq &asc >key !if &seq %eseq "A" do one option... !endif !if &seq %eseq "B" another option !endif If you have, or when you get version 3.9, a more graceful fix is possible using the new &bind function that returns the name of a function bound to a given text key sequence: bind-to-key execute-macro-30 M-[ 30 store-macro set %eseq >key &ind &cat "FN" &asc %eseq !endm I hope this is helpfull, Daniel Lawrence UUCP: ihnp4!pur-ee!j.cc.purdue.edu!nwd ARPA: nwd@j.cc.purdue.edu FIDO: 201/2 The Programmer's Room (317) 742-5533 ATT: (317) 742-5153