HEATH keypad library Bill van Melle, 6 March 1980 The HEATH library assigns EMACS ^R functions to the keypad keys and special function keys across the top. Loading the library puts the terminal in "Alternate Keypad Mode" (if you should lose this mode, you can type "Esc =" offline). The keys are assigned as follows: Keypad (only first 3 rows are shiftable): +-------------+-------------+-------------+ |IC |^ |DC | | Instand Ext | Top Screen | Kill Word | | ---------- | ---------- | --------- | | Extend Cmd | Up Line | Kill Char | |7 |8 |9 | +-------------+-------------+-------------+ |<- |HM |-> | | Begin Line | Back Window | End of Line | | ---------- | ----------- | ----------- | | Back Char | Fwrd Window | Fwrd Char | |4 |5 |6 | +-------------+-------------+-------------+ |IL |v |DL | | Back Pgraph | Botm Screen | Fwrd Pgraph | | ----------- | ----------- | ----------- | | Back Word | Down Line | Fwrd Word | |1 |2 |3 | +-------------+-------------+-------------+ | | | | | | | | | Meta- | Ctrl-Meta- | Next Line | | | | | |0 |. |Enter | +-------------+-------------+-------------+ Function keys across top: f1 f2 f3 f4 f5 ERASE blue red gray +-------+-------+-------+-------+-------+-------+-------+-------+-------+ | | | | | | Copy | | | | | | | | | | Region| | | | | | | | | | ----- | | | | | | Set/ | Trans-| Back | Skip | Kill | Repeat| Zap | Meta- | | Meta- | Pop | pose | Skip | to | Region| Skip/ | to | Minus | | | Mark | chars | | Char | | Zap | Char | | +-------+-------+-------+-------+-------+-------+-------+-------+-------+ Notes: All of the special keys send character sequences beginning with Escape, so you can't use Escape as a ^R command. Meta prefix is instead on 0 and f1 (I prefer 0, but the TV package puts it on f1, so it's also f1 in this package for some little compatibility). However, note that anywhere EXCEPT as a command, you still want to use ordinary Escape; e.g. to terminate an Isearch (if you type a keypad command here, you'll definitely get the wrong thing--EMACS reads "Esc something", uses the Esc to terminate the search, and then inserts the something!). To insert an Escape it is easiest to enter it as Ctrl-Meta-Escape (". Esc" in this package), which runs self-insert. Since these commands are implemented as EMACS prefix characters, they are easy to change (see below), and they document themselves (they respond correctly to M-? or HELP C). Since the minibuffer reassigns Escape, you can't use the keypad in the minibuffer. The assignments above are pretty arbitrary (except for the arrows, which seem natural enough); if you want something different, you can use the Extended command Set Heath Key (analogous to Set Key) to change the assignments. The assignments to the arrows, unshifted HOME and DC, f1 and "gray" agree with the assignments in the TVEDIT heath keypad package, for those who care. -------- Set Heath Key: Assigns a function to a Heath special key. For best results, use ^R Instant Extended Command (C-M-X) to invoke this (this will let you have function name recognition). String Argument is name of function to assign. You will be prompted to type the key to put the function on. Alternatively, if you are calling this from your init file, you can pass the key as a numeric arg. In this case, the keys are coded as follows: 0-9 unshifted keypad digits 10 period 11-19 shifted keypad digits (can't shift zero) 20 ENTER (can't shift this, either) 21-29 the 9 keys across the top (f1-f5, ERASE, blue,red,gray) 30 Shift-ERASE. You may also pass the function DEFINITION as a pre-comma arg, instead of passing the function NAME as a string arg. -------- If you have defined the variable $HEATH Setup Hook$, it will be run when the HEATH library is loaded, but AFTER all the above assignments have been made, so that you can adjust the assignments to suit your own taste. The function Set Heath Key will be in register S, so you can access it via MS, e.g. 21MS^R Transpose Words$ would put the function ^R Transpose Words on the key f1.