[comp.unix.xenix] micro-emacs

kent@ncoast.UUCP (02/16/87)

s/*** REPLACE THIS LINE WITH YOUR MESSAGE ***/YOUR MESSAGE/g

I posted a note asking how you use the keypad edit keys on a AT running
SCO Xenix in Micro Emacs.  Here is what I figured out:

All of the function keys and editing keypad keys return strings starting
"\033[".  All you have to do is map that sequence to the SPEC attribute,
and those keys become bindable.  You lose the ability to bind META-[, but
I can live with that.

In input.c, there is a function called getcmd().  In it there is code
to interpret the various command sequences (i.e. CTLX, META).  Add some
code that Maps "\033[" to the special attribute - something like.

	if (c == '\033')
#ifdef SCO
		c = get1key();
		if (c == '[')
		{
			c = get1key();
			return c | SPEC;
		}
#endif

Once you do that, emacs will think any key sequence starting in "\033["
is a "FN" key, and therefore bindable.

You can then hack ebinding.h if you want some bindings hard-coded, but
it isn't really necessary - just do the bindings in your .emacsrc.