wallis@weitek.UUCP (Bob Wallis) (07/18/87)
>>>>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