i111@ztivax.UUCP (07/31/87)
Does anybody know, how to bind the VT100 arrow keys and perhaps the keypad keys into MicroEmacs 3.8i? I compiled it on a SUN workstation under BSD4.2 and use it with a Tektronix 4107 in VT100 mode. 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. I want to make the Emacs to look more like an EDT editor, so I have yo define the keypad keys. Can somebody give me a hint please ? My adress: Siemens AG ZTI Inf 112 Otto-Hahn-Ring 6 D 8000 Muenchen 83 West-Germany email adress: ...unido! \ ztivax!i111 / ... siemens!
nwd@j.cc.purdue.edu (Daniel Lawrence) (08/04/87)
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 <etc> 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