[comp.emacs] MicroEMACS 3.10 beta - #3

davidsen@steinmetz.ge.com (William E. Davidsen Jr) (12/17/88)

                     Running 3.10 on Xenix and V/AT

  The new TCAP.C doesn't seem to support the use of ANSI function key
sequences. There is a 2nd version of tcap.c distributed separately from
the emacssrc.arc file, which also doesn't support the functions, but
works a lot better in other ways. Since this is noted as a temporary
version, I guess this is a temporary fix. It goes in the "get1key"
routine, which appears in both input.c and tcap.c. This is the fix for
tcap.c, and allows correct function of function key strokes starting
with "ESC-[". Note that the following character is NOT case shifted,
since some keys generate upper and lowercase values of the same letter.

262a260,277
> 
> #if	(USG | BSD | V7) & VT100
> 	if (c == 0x1b) {			/* Apply SPEC prefix	*/
> 		if (tttermc == (CTRL+0x1b+'@'))	/* quit if search term */
> 			return (CTRL+0x1b+'@');
> 	        c = tgetc();
> 	        if (c>=0x00 && c<=0x1F)	/* control key? */
>         	        c = CTRL | (c+'@');
> 		if (c == '[') {
> 			c = tgetc();
> 		        if (c>=0x00 && c<=0x1F)	/* control key? */
>         		        c = CTRL | (c+'@');
> 			return(SPEC | c);
> 		}
> 		if (islower(c)) c = toupper(c);
> 		return(META | c);
> 	}
> #endif

































































-- 
	bill davidsen		(wedu@ge-crd.arpa)
  {uunet | philabs}!steinmetz!crdos1!davidsen
"Stupidity, like virtue, is its own reward" -me