davidsen@steinmetz.steinmetz.UUCP (William E. Davidsen Jr) (07/31/87)
I finally got to fixing MicroEMACS to work with the AT&T 7300 special keys. Getting vthe cursor keys to work was simple, since they generate ANSI control sequences and the following change can be made in getcmd (input.c): >> /* code for ANSI keystrokes */ >> if (c == '[') >> { /* get an extended escape sequence */ >> c = get1key(); >> return (SPEC | c); >> } This change also will allow the keypad and function keys in Xenix to work, and any other terminal which generates ANSI style sequences. These are the sequences which are generated by the keys on the numeric keypad. Comments follow. AT&T 7300 special keys norm shift beg 9 NB end 0 NN prev Ng NG next Nh NH home [H NM page [U [V rfrsh Na The unshifted 'beg' and 'end' keys are not usable unless you go into main.c and disable arguments after META, although you still have them after ^U (universal-argument). If you are willing to give up the standard binding of M-N for next paragraph (I bound it to shifted next), you can recognize ESC-O and ESC-N as FN alternates. This is not as clean as defining SPCL1 and SPCL2, but much less work. To allow ESC-N and ESC-O to start SPCL key sequences, use the following line in getcmd: >> if (c == '[' || c == 'N' || c == 'O') To allow ESC-digit to be bound (the beg and end keys), delete the section in main.c which starts with the line: >> if ((c & META) && ((basec >= '0' && basec <= '9') || basec == '-')) { This will still allow the use of ^U for arguments. This is the start of a .emacsrc file for the 7300, giving the bindings for the arrow keys. bind-to-key previous-line FNA bind-to-key next-line FNB bind-to-key forward-character FNC bind-to-key backward-character FND -- bill davidsen (wedu@ge-crd.arpa) {chinet | philabs | sesimo}!steinmetz!crdos1!davidsen "Stupidity, like virtue, is its own reward" -me