Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!ra!it1 From: it1@ra.MsState.Edu (Tim Tsai) Newsgroups: comp.unix.questions Subject: decoding function keys Message-ID: Date: 13 Dec 90 04:29:28 GMT Lines: 15 I've been writing a small routine to decode the keyboard cursor keys as an addition to an editor (dte). Since the editor didn't use the curses package, I had to decode the multi-character keys myself. Anyway, I noticed the sequence for key_up on a vt102 terminal is ESC-OA, but my terminal program (NCSA Telnet for the PC) sends out ESC-[A. Why the difference? VI seems to recognize both format. Is it safe to replace the 'O' with '[', and vice versa? Lastly, does this behavior exist only on VT* terminals? Thanks in advance for any help.. Environment: Sun OS 4.1 using the SYS V compiler. -- Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.