Xref: utzoo comp.editors:927 comp.emacs:6835 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!uakari.primate.wisc.edu!aplcen!ginosko!brutus.cs.uiuc.edu!apple!sun-barr!newstop!sun!flam!jpayne From: jpayne%flam@Sun.COM (Jonathan Payne) Newsgroups: comp.editors,comp.emacs Subject: Re: Arrowkeys for Jove Message-ID: <124380@sun.Eng.Sun.COM> Date: 8 Sep 89 23:12:35 GMT References: <1989Sep8.022556.21527@agate.uucp> Sender: news@sun.Eng.Sun.COM Reply-To: jpayne@sun.UUCP (Jonathan Payne) Distribution: na Organization: Sun Microsystems, Mountain View Lines: 45 In article <1989Sep8.022556.21527@agate.uucp> c60a-4dc@WEB.berkeley.edu () writes: > > Though I know the flexibility and power, I have kept from using Jove >for my editor; I use Emacs on Xwindow and I prepare texts on any Mac editors >and send when on modem. And the single reason is, Jove originally doesn't bind >arrow key! > It is so painful that makes me feel Jove is not worth it despite its >power. And I tried bind arrow keys for vt100 by modifying .joverc and as you >guessed, failed. First I added the following: > >And when trying to use arrow keys, it beeps, and returns "ESC-0 not bound" on >the command line. So I took a look at cmd.doc and found a following: > "ESC O not bound" should have been the give-away. Your arrow-keys are generating ^[Ox, not ^[[x. JOVE isn't as powerful as emacs. But it's fast and small and does most of the things in a reasonable way. The latest version has the following in the system-wide initialization file: make-keymap ansi-codes bind-keymap-to-key ansi-codes ^[[ bind-keymap-to-key ansi-codes ^[O bind-to-key previous-line ^[[A bind-to-key next-line ^[[B bind-to-key forward-character ^[[C bind-to-key backward-character ^[[D It creates a keymap called ansi-codes and binds that keymap to two differernt keys, "ESC [" and "ESC O". Then it binds the commands as you would like. NOTE: Binding with the sequence ^[[x binds it for ^[Ox as well, since they are sharing the ansi-codes map. You are right, it is a pain to bind arbitary sequences like those generated from the sun keyboards. Fortunately for me I hate function keys about as much as I hate arrow keys. The reason the arrow keys haven't been bound in the past is that I wanted to discourage people from using them. It's much better and faster to use the ^U command to move around in big chunks. There is no substitute for ^U^U^N or ^U^U^F, there really isn't. In this day and age everyone has a work station on his or her desk, so the machine can keep up with people holding down the arrow keys. Whatever.