🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #2429

uemacs cursor keys

#2429
From: root
Date: Wed, 28 Jun 1989 22:52
40 lines
1512 bytes
This is how I use cursor keys with micro emacs.  Put the code below in
your .uemacsrc file.  VT100 terminals output esc[A, esc[B, esc[C, and
esc[D for cursor up,down,left,and right.  Method: First bind a macro
to esc[ ( esc = M).  Then use the get key function &gtk to intercept
the next charactor output by the cursor key. 

I use this method with other key combinations.  For example:

    esc cursor down, esc cursor up, esc cursor left, esc cursor right,
    for multiple cursor movements

    tab a, tab b, esc tab a, esc tab b,  to move to and set
    column tab positions

    tab 1, tab 2, esc tab 1, esc tab 2,  to move to and set line tab
    positions

I also have function key f1 bound to togle my screen between 25 and 50 lines.

bind-to-key execute-macro-6 M-[
; cursor up, down, left , right
6 store-macro
set %key1 &gtk
   !if &seq %key1 "A"
      previous-line
      !return
   !endif
   !if &seq %key1 "B"
      next-line
      !return
   !endif
   !if &seq %key1 "C"
       forward-character
      !return
   !endif
   !if &seq %key1 "D"
       backward-character
      !return
   !endif
!endm
Technical Details
Message-ID: <88@trwrb.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!decwrl!polyslo!usc!aero!trwind!trwrb!root

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!decwrl!polyslo!usc!aero!trwind!trwrb!root
From: root@trwrb.UUCP (root)
Newsgroups: comp.sys.atari.st
Subject: uemacs cursor keys
Message-ID: <88@trwrb.UUCP>
Date: 28 Jun 89 22:52:07 GMT
Reply-To: root@trwrb.UUCP (root)
Organization: TRW Space and Defense Sector, Redondo Beach, CA
Lines: 40