Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!dciem!nrcaer!xios!greg From: greg@xios.XIOS.UUCP (Greg Franks) Newsgroups: comp.emacs Subject: Re: Microemacs Message-ID: <333@xios.XIOS.UUCP> Date: Mon, 27-Jul-87 15:18:15 EDT Article-I.D.: xios.333 Posted: Mon Jul 27 15:18:15 1987 Date-Received: Fri, 31-Jul-87 01:18:47 EDT References: <1250@ihlpm.ATT.COM> <782@cpocd2.UUCP> <149@ivory.SanDiego.NCR.COM> <1949@tekigm2.TEK.COM> Reply-To: greg@sdn.UUCP (Greg Franks) Organization: XIOS Systems Corporation, Ottawa, Ontario, Canada Lines: 55 >>In article <1250@ihlpm.ATT.COM> aaa@ihlpm.ATT.COM (Adams) writes: >>>Does anyone know how to do key bindings for a vt100? I have microemacs >>>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 >net? The trick we use here is a SMOP. If you have curses, you can wedge in a terminfo handler (start from the tcap.c file and hack away). Turn the keypad on. Curses will then map the escape sequences found in the terminfo database into stuff like 0400 - 0533. If the character falls into that range, zap off the excess bits and OR in the FUNCTION bit. You can then bind the keypad in as FNA, FN^A etc etc etc. We also have terminals that have a META key so we map them too. tinfogetc() { register int c; c = wgetch( stdscr ); if ( 0x0080 <= c && c < 0x0100 ) { c &= 0x7f; /* Mask off crap */ c = toupper( c ); if ( 0x00 <= c && c <= 0x1f ) c |= CTRL | 0x0040; c |= META; /* note meta prefix */ } else if ( 0x0101 <= c && c <= 0x0FFF ) { c &= 0x7f; /* Mask off crap. */ /* Curses has returned a special function key. */ /* Zap off the high bit and OR in SPECIAL */ /* designation. Control characters are have */ /* both the SPECIAL and CONTROL designators set */ if ( 0x00 <= c && c <= 0x1f ) c |= CTRL | 0x0040; c |= SPEC; } return( c ); } We also permit remap of the search terminator. Meta is on PF1, and the search terminator is on . If there is enough interest, I'll post the whole file (and diffs). *** Please note that I am using uemacs 3.8i on a SYS V machine *** -- Greg Franks XIOS Systems Corporation, 1600 Carling Avenue, (613) 725-5411 Ottawa, Ontario, Canada, K1Z 8R8 seismo!mnetor!dciem!nrcaer!xios!greg "Vermont ain't flat!"