@node Key, Label, Image, Commands @iftex @syntax Key. @end iftex @example Syntax: KEY KEY key string @end example @pindex Key Define a key to generate a string. This is most often used simply to save typing some common command such as @code{edit_hist}. With the command KEY, you are prompted for the @code{key} to define, and the string. Because you are not using the history editor when you type the key, you can simply hit the key that you want defined, type a space, and then type the string terminated by a carriage return. The other form, where the whole command appears on one line, is probably more suitable for use in a macro such as your private startup macro (see under @code{startup2} in the index). If you try entering it at the keyboard any special characters in @code{key}, such as ESC, will be interpreted by the history editor so you'll probably have to quote the @code{key} with @ctrl{Q} or ESC-q. Alternatively you can use ^ and printing characters , or octal numbers, to represent the escape characters in the same way as for EDIT (@pxref{Edit}). If @code{key} is given as @code{pf#} or @code{PF#} (where @code{#} is 1, 2, 3, or 4) it will be interpreted as a special function key on your keyboard in a terminal-independent way (see the description of termcap (@pxref{Termcap}) to see how these keys are defined). KEY definitions are listed along with other key bindings by the LIST EDIT command. If the @code{string} ends in a \N, it will be executed the moment that the key is struck. (Note that this is \N not \n, which would have been interpreted as a newline.) Only 10 keys can be defined, after that you'll start overwriting earlier definitions (this is a result of the way that KEY was implemented; if it is a serious nuisance send us mail).