Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!seismo!husc6!bloom-beacon!think!ames!oliveb!pyramid!weitek!wallis
From: wallis@weitek.UUCP (Bob Wallis)
Newsgroups: comp.emacs
Subject: Re: Microemacs function keys
Message-ID: <3124@weitek.UUCP>
Date: Fri, 17-Jul-87 18:35:50 EDT
Article-I.D.: weitek.3124
Posted: Fri Jul 17 18:35:50 1987
Date-Received: Sat, 18-Jul-87 17:47:47 EDT
References: <1250@ihlpm.ATT.COM> <782@cpocd2.UUCP> <149@ivory.SanDiego.NCR.COM> <1949@tekigm2.TEK.COM>
Reply-To: wallis@weitek.UUCP (Bob Wallis)
Organization: Weitek Corp. Sunnyvale, Ca
Lines: 39

>>>>3.8i and I cannot get the key bindings to work properly with a
>>>>vt100.  
>>I would like to know how also. Could someone reply by email or to the 
>for the VT100 keypad.  VT100  keystrokes  are in the sequence "ESC-O-xx"
>where xx is the actual key.  ME only will see the meta then the O.  So, if

The following is the kludge I used in the file "input.c" to get the keypad to
work with a XENIX AT - I think this would also work with a VT 100. I wasn't
really sure of what I was doing, but it seems to work OK.

#if     MSDOS | ST520                  /* old code */
  if (c == 0) {                        /* Apply SPEC prefix      */
    c = tgetc ();
    if (c >= 0x00 && c <= 0x1F)        /* control key? */
      c = CTRL | (c + '@');
    return (SPEC | c);
  }
#endif


#if     XENIX                          /* new code */
/*----------------------------------------------------------------------
        look for the sequence 1b,5b,xx which indicates a function
        key & xform the 1b,5b to SPEC in order to simulate the way
        MSDOS works.
----------------------------------------------------------------------*/
  if (c == 0x1b) {                     /* Apply SPEC prefix?  */
    if ((c2 = getc (stdin) & 0x7f) == 0x5b) {/* function key? */
      c2 = getc (stdin) & 0x7f;        /* get the xx key */
      return (SPEC | c2);              /* indicate that this was function */
    }
    else                               /* return the char we peeked at- */
      ungetc (c2, stdin);              /* was not a function key */
  }
#endif

Bob Wallis

UUCP {turtlevax,pyramid,cae780,apple,wyse}!weitek!wallis