Search Top Index
HELP VEDOLDKEYS Robert Duncan, Nov 1989 Updated Aaron Sloman Jan 1991 Default key bindings in VED prior to Poplog 14.5. These key bindings have been superseded as the default in Poplog 14.5 by a new set of bindings described in HELP * VEDKEYS. Anyone who wants to restore these bindings as the default can do so by including at the start of their "vedinit.p" file the two lines: vedoldkeys -> veddefaultkeys; veddefaultkeys(); WARNING: some of the bindings described below are over-ridden by function key assignments in particular terminal customising libraries, e.g. LIB * VEDVT220KEYS (as described in HELP * VEDVT220KEYS) CONTENTS - (Use <ENTER> g to access required sections) -- Introduction -- Checking current key bindings -- Changes for Poplog Version 14 -- Notation -- Special Characters -- Key Bindings by Function -- + Moving the Cursor -- + Inserting -- + Deleting -- + Re-inserting deleted text -- + Searching -- + Windows and Files -- + The Command Line -- + The Marked Range -- + Justifying and formatting text -- + The Position Stack -- + Compiling -- + Special Editing Functions -- + Switching Modes -- + Getting Help -- Key Bindings by Key -- + Control Keys -- + Escape Keys -- + ESC followed by a letter -- + ESC followed by a control character -- + ESC followed by other symbols -- Longer Sequences -- The "kill" table -- Tailoring VED -- Introduction ------------------------------------------------------- This file describes the set of key bindings which made up the default keymap for VED prior to Poplog 14.5. This has since been superseded by a new set described in HELP * VEDKEYS, so the key bindings described here are now referred to as the ``old'' bindings, and are associated with the procedure VEDOLDKEYS. You can at any time restore VED's keymap to exactly the state described here simply by calling the procedure: vedoldkeys(); NB: this will erase any custom bindings you may have installed. These old bindings are not all terribly consistent, being derived from the original version of VED which used character sequences generated by the function keys on a Visual 200 VDU. Newcomers to VED are advised to stick with the new defaults described in HELP * VEDKEYS, although confirmed EMACS users might like to use the alternative described in HELP * VEDEMACS. Most VED terminal libraries define their own key bindings to make use of any function keys they might provide. These bindings will typically be extra to those described here, but some libraries do redefine some of the default key bindings to suit the layout of function keys. If in doubt, check the help file for the terminal library you are using. You can always prevent terminal libraries from defining extra key bindings by assigning FALSE to the variable VEDFUNCTIONKEYS. A list of help files describing different terminal configurations can be found in HELP * VED/Terminal, with more detail in REF * VEDTERMINALS. -- Checking current key bindings -------------------------------------- To find out what any particular key sequence is bound to, try: <ENTER> hk This will ask you to press the key or key sequence. If there is a corresponding procedure its name will be printed on the command line. If nothing is printed then you have started the beginning of a key sequence which is not complete. You can try completing the sequence in various ways. <ENTER> hkey is similar, but more verbose. To define your own key bindings use the syntax VEDSET or the procedure VEDSETKEY - see HELP *VEDSET, *VEDSETKEY. For lists of additional relevant help files see HELP * VED -- Changes for Poplog Version 14 -------------------------------------- Some new mappings from key sequences to VED functions have been provided for the sake of users who have to use terminals without a good collection of function keys, and without a convertible keypad. All such mappings are marked "++" below. In addition this file has been reorganised. The facilities are first presented grouped according to function, and secondly according to the key sequences that produce them. -- Notation ----------------------------------------------------------- In the descriptions of key bindings which follow, the notation: ^X (pronounced "control X") stands for the single character generated by pressing the <CTRL> key and the X key simultaneously. Control characters are traditionally written as upper case, but either case will do. The notation: ESC x (pronounced "escape X") is a two character sequence, generated by pressing first the <ESC> key and then the unshifted X key. The case of "x" is significant here. Not all keyboards have an <ESC> key clearly marked. If you can't find one, it can be simulated by typing ^[. (Note to EMACS users: VED will not accept META-X in place of ESC X.) Longer sequences are built up in the obvious way, so that ESC ^X is generated by pressing first <ESC> and then ^X. The keys TAB, LF and RETURN are the tab, line-feed and carriage-return keys. They are normally marked as such on the keyboard, but just in case, the correspondences are: TAB ^I LF ^J RETURN ^M Some recently introduced keyboards no longer have the LF key, unfortunately. The DEL or "delete" key may be marked in various ways, but has no obvious alternative. VED procedure names and variable names are written here in upper case to make them stand out, but they are in fact lower case. WARNING: distinguish upper and lower case. E.g. the following two are different: ESC a ESC A The second one requires the use of the SHIFT key. (Sometimes marked with an upward pointing arrow). -- Special Characters ------------------------------------------------- The characters ^O ^Q ^S ^X ^Y are often interpreted specially by the operating system or by the terminal and so are not usually used by VED. The character ^C is used to interrupt VED and abort the current command. On some systems a different character may be used as the interrupt character. On VMS ^Y is the "abort" or "quit" character. Some, but not all, Unix users also set it up as the "quit" character. -- Key Bindings by Function ------------------------------------------- -- + Moving the Cursor ------------------------------------------------ Key Function VED Procedure --- -------- ------------- ^T Move up one line CHARUP ^V Move down one line CHARDOWN ^H Move left one character CHARLEFT (Sometimes redefined as CHARDELETE) ESC ^F Move right one character CHARRIGHT ++ ESC i Move up several lines CHARUPLOTS ESC f Move down several lines CHARDOWNLOTS ESC M Move left several characters CHARLEFTLOTS ESC 2 Move right several characters CHARRIGHTLOTS ESC J Move down and right several lines CHARDOWNRIGHTLOTS ESC K Move down and left several lines CHARDOWNLEFTLOTS ESC 1 Move up several lines CHARUPRIGHTLOTS ESC L Move up and left several lines CHARUPLEFTLOTS ESC O Move to middle column of screen, SCREENMIDDLE (on current line). On VT100 initiates special sequences ^B Move left one word WORDLEFT ^F Move right one word WORD RIGHT ESC A Screen up SCREENUP ^K Screen up SCREENUP ESC B Screen down SCREENDOWN ^L Screen down SCREENDOWN ESC C Move to end of text line TEXTRIGHT ESC D Move to left edge of screen (column 1) SCREENLEFT ESC ] Move to right edge of screen SCREENRIGHT ESC ^ Move to start of line TEXTLEFT LF Move to start of next line NEXTLINE (or ^J) ESC t Go to top of file TOPFILE ESC b Go to end (bottom) of file ENDFILE ESC { Go to start of marked range MARKFIND ++ ESC } Go to end of marked range ENDRANGE ++ ESC TAB Move to next tab stop TABRIGHT To go to a particular line number, do <ENTER> line-number e.g, <ENTER> 123 to go to line 123. See also the section on 'Searching' below. -- + Inserting -------------------------------------------------------- Key Function VED Procedure --- -------- ------------- ESC ) Open new line above current LINEABOVE ESC * Open new line below current LINEBELOW All printing characters are inserted immediately at the current cursor position. Characters after the cursor are normally shifted right to make room, but setting VEDSTATIC causes existing characters to be overwritten instead (see the section 'Switching Modes' below). Tab and carriage return characters are interpreted as follows: TAB Inserts a single tab character at the current cursor position, or if VEDNOTABS is TRUE, sufficient spaces to pad to the next tab stop. See HELP * VEDNOTABS. RETURN In normal mode, this breaks the current line at the cursor position. In immediate mode (see HELP * IM), the line is sent to the compiler. On the status line (command line) it causes the current command to be obeyed. -- + Deleting --------------------------------------------------------- Key Function VED Procedure --- -------- ------------- ^P Delete character under cursor DOTDELETE DEL Delete character to left of cursor CHARDELETE ^W Delete word to left of cursor WORDLEFTDELETE ^U Delete line to left of cursor CLEARHEAD ^R Delete word to right of cursor WORDRIGHTDELETE ^E Delete line to right of cursor CLEARTAIL ^] Delete current line LINEDELETE ESC | Delete marked range ENTER d ++ ESC , Delete region between stacked positions ENTER cut ++ (See HELP * VED_CUT,* VED_SPLICE)(The cut region can be re-inserted using "ESC ." (splice) Note: additional delete facilities are described in the section on the "kill" table, below. -- + Re-inserting deleted text ---------------------------------------- The letter "y" for "yank" refers to retrieval of previously deleted text. Key Function VED Procedure --- -------- ------------- ESC 9 ESC y Re-insert marked range last deleted ENTER y ++ ESC 8 Yank whole line last deleted ENTER yankl ++ ESC ^U ESC ^W ESC 7 Yank word or part line last deleted. ENTER yankw ++ ESC . Re-insert text last removed by ved_cut ENTER splice ++ (See "ESC ," above HELP * VED_CUT,* VED_SPLICE) The last marked range deleted can be retrieved with ENTER y. The last non-empty line deleted can be recovered with ENTER yankl. The last word or part line deleted can be recovered with ENTER yankw. The last text deleted with ENTER cut, can be recovered with ENTER splice. In all cases the text is re-inserted at a location determined by where the cursor is. "y" inserts after the current line. "yankl" inserts before the current line so that it can undo vedlinedelete. "yankw" and "splice" insert at the current cursor location, after which re-formatting may be necessary. There is no ring or stack of delete buffers: only the last thing deleted can be recovered. See HELP * YANK for full details. Note that on many terminals, for any keystroke sequence leading to a deletion of more than one character, prefixing the same key sequence with ESC will undo the deletion. -- + Searching -------------------------------------------------------- Key Function VED Procedure --- -------- ------------- ESC / Repeat last search forwards ENTER re_search ESC \ Repeat last search backwards ENTER re_back_search To search forwards for a given string, do <ENTER> /<string> <ENTER> "<string> To search backwards for a given string, do <ENTER> \<string> <ENTER> `<string> In both cases the second method finds only non-embedded strings. See HELP * VEDSEARCH for a summary of additional search and replace commands. -- + Windows and Files ------------------------------------------------ Key Function VED Procedure --- -------- ------------- ESC v Refresh the current window REFRESH ESC w Toggle half/full-screen window SETWINDOW ESC x Switch to other window SWAPFILES ESC ^H ESC BS Screen up in other window ENTER xup ESC ^J ESC LF Screen down in other window ENTER xdn ESC e Enter file selection menu FILESELECT ESC q Quit the current file ENTER q ESC 3 Complete file name to left of cursor FILECOMPLETE ++ (See HELP * VEDFILECOMPLETE) -- + The Command Line ------------------------------------------------- Not all terminals have a key marked "ENTER" that can be made to transmit a special code to tell VED to move to the status line. So some alternatives are provided. ++ Key Function VED Procedure --- -------- ------------- ESC RETURN ++ ESC ^G ++ ENTER Prepare to enter a command on command line ENTER ^G Switch to/from command line STATUSSWITCH ESC g ++ ^_ Redo command on command line REDOCOMMAND -- + The Marked Range ------------------------------------------------- Key Function VED Procedure --- -------- ------------- ESC $ Mark start of range MARKLO ESC % Mark end of range MARKHI ESC ^P Mark the current procedure ENTER mcp ++ ESC { Go to start of marked range MARKFIND ++ ESC } Go to end of marked range ENDRANGE ++ ^D Compile the marked range ENTER lmr ESC | Delete the marked range ENTER d ++ ESC y ++ ESC 9 Yank range last deleted ENTER y ++ ESC k Copy marked range to after line with cursor ENTER t ++ (i.e. transcribe it) ESC m Move marked range to after line with cursor ENTER m ++ See HELP * MARK for a full description of the marked range. -- + Justifying and formatting text ----------------------------------- ESC : Justify current procedure ENTER jcp ++ ESC = Right Justify current paragraph ENTER jp ++ ESC ; Right Justify and align current paragraph ENTER jjp ++ -- + The Position Stack ----------------------------------------------- Key Function VED Procedure --- -------- ------------- ESC ' Push current position on position stack PUSHKEY ESC ( Pop last stacked position POPKEY ESC p Swap current and stacked positions EXCHANGEPOSITION ESC , <ENTER> cut Delete region between stacked positions ENTER cut (re-insert with ENTER splice or "ESC .") -- + Compiling -------------------------------------------------------- Key Function VED Procedure --- -------- ------------- ^D Compile the marked range ENTER lmr ESC c Compile the current procedure ENTER lcp ESC d Compile the current line LOADLINE In immediate mode: RETURN Send current line to compiler ESC ^D Toggle input on RETURN ENTER switchmode_im (see REF * ved_switchmode_im) ESC ^Z Send end-of-file to immediate-mode compiler ENTER end_im (NOT available to Unix users who use ^Z as the suspend character) See HELP * LMR, * IM. -- + Special Editing Functions ---------------------------------------- Key Function VED Procedure --- -------- ------------- ESC ^T Transpose two characters to left of cursor ENTER sw ++ ESC < Change current word to lower case ENTER lcw ++ ESC > Change current word to upper case ENTER ucw ++ ^N Change case of character under cursor CHANGECASE ++ -- + Switching Modes -------------------------------------------------- Key Function VED Procedure --- -------- ------------- ESC # Toggle static (overstrike) mode SETSTATIC ESC z Toggle hard tabs (Alters * VEDHARDTAPS) ESC ^D Toggle input on RETURN in immediate mode ENTER switchmode_im -- + Getting Help ----------------------------------------------------- Key Function VED Procedure --- -------- ------------- ESC h Get help on current word GETSYSFILE ESC @ Show a key binding ENTER hk ++ ESC n Search for next isolated asterisk NEXTHELP ESC u ESC N Search for previous isolated asterisk PREVIOUSHELP ++ Isolated asterisks usually indicate help cross-references: to follow up a cross-reference, type <ESC> n to locate the asterisk, then <ESC> h to get the corresponding help, teach or ref file. Try (for example) HELP * HELP. -- Key Bindings by Key ------------------------------------------------ -- + Control Keys ----------------------------------------------------- If you use a terminal other than a VISUAL 200 some of the sequences may have been re-assigned. For users who do not have a terminal with 'alternate keypad' mode, LIB KEYPAD may be useful. SHOWLIB KEYPAD provides information. Some of the VED functions can be achieved by control characters, i.e. hold down the CTRL button and press a key. (CTRL-A is represented below as ^A). Note that some of these functions may be over-ridden by conversion to particular terminals. LIB VEDEMACS changes most of them. Key Function VED Procedure --- -------- ------------- ^A Move to beginning of line SCREENLEFT ^B Move back a word WORDLEFT ^C Interrupt ^D Load marked range (for program files) ENTER lmr (See HELP LMR) ^E Delete to end of line CLEARTAIL ^F Move forward a word WORDRIGHT ^G Like CHANGE mode key STATUSSWITCH ^H Back space. Like BS key. CHARLEFT Move cursor left one character ^I TAB, like TAB key. Insert suitable number (insert TAB) of spaces, or tabs, depending whether VEDNOTABS is true or false. See HELP * VEDNOTABS ^J (LF key) Move to beginning of next line NEXTLINE (Position of cursor is controlled by VEDLEFTMARGIN.) ^K Move to top of screen SCREENUP ^L Move to bottom of screen SCREENDOWN ^M Same as RETURN. Insert new line VEDDOCR (In "immediate mode" sends current line to the compiler) ^N Change case of character under cursor CHANGECASE ^O Often trapped by operating system - can't be used. ^P Delete character at cursor Position DOTDELETE ^Q Often trapped by operating system - can't be used. ^R Delete WORD to RIGHT of cursor WORDRIGHTDELETE ^S trapped by operating system - can't be used. ^T Move up a line. (Like keypad 8) CHARUP ^U Delete line to left of cursor CLEARHEAD ^V Move down a line (Like keypad 2) CHARDOWN ^W Delete Word to left of cursor WORDLEFTDELETE ^X On VMS turns this into ^U, otherwise undefined ^Y Interrupt and abort POP11 on VMS. You can lose your work! (On Unix,if set as QUIT character this aborts Poplog if typed twice within a second. Otherwise it calls SETPOP). ^Z Move to right of current line TEXTRIGHT (NOT available to Unix users who use ^Z as the suspend character) ^] Delete current line LINEDELETE ^_ (CTRL and underscore) REDO last command REDOCOMMAND (doesn't work on all terminals.) ^^ (CTRL and "^" button). Not used ^\ (CTRL and "\"). Not used (Sometimes set to "suspend process" on Unix.) ^@ Null character. Ignored by VED because some terminals send spurious nulls. DEL Delete character to left of cursor CHARDELETE -- + Escape Keys ------------------------------------------------------ Several commands may be given by typing the <ESC> key followed by another key. These look arbitrary. The sequences are in fact mostly those produced by VT52 or Visual 200 function keys, for which VED was originally used. But you can also type them directly yourself. Note that the upper case letters, e.g. <ESC> H need the SHIFT key to be pressed. Unless you are using a Visual 200 VDU it is very likely that the effect of some of these sequences will have been redefined to suit the codes generated by certain function keys. For instance, some of the sequences marked 'unused' may be used by your keyboard if it is not a VISUAL 200. LIB VEDEMACS redefines most of them. You can always check with the ENTER hk command, as described above. -- + ESC followed by a letter ----------------------------------------- Key Function VED Procedure --- -------- ------------- ESC a Move left a quarter window CHARLEFTLOTS ESC b Go to bottom of file ENDFILE ESC c Compile current procedure ENTER lcp ESC d Compile current line) LOADLINE ESC e Give menu of files being edited FILESELECT ESC f Move down a quarter window CHARDOWNLOTS ESC g Redo last command REDOCOMMAND ++ ESC h Get help file for word at cursor. HELPFOR ESC i Move up a quarter of a screen CHARUPLOTS ESC j Justify current procedure ENTER jcp ++ ESC k Transcribe marked range ENTER t ++ ESC l Delete word to left of cursor WORDLEFTDELETE ESC m Move marked range ENTER m ++ ESC n Search for next "*"- used in help NEXTHELP files for finding cross references) ESC o unused ESC p Exchange current position with top EXCHANGEPOSITION of position stack ESC q Quit current file ENTER q ESC r Delete word to right of cursor WORDRIGHTDELETE ESC s Move right a quarter of a screen CHARRIGHTLOTS ESC t Go to top of file TOPFILE ESC u Go to previous cross reference PREVIOUSHELP ++ (Like ESC n backwards) ESC v refresh screen REFRESH ESC w enlarge or contract window size SETWINDOW ESC x swap to previous VED buffer SWAPFILES ESC y "Yank" in last range deleted ENTER y ESC z Switch 'hard tabs' mode on or off (Alters VEDHARDTABS) ESC A like up arrow button SCREENUP ESC B like down arrow button SCREENDOWN ESC C like right arrow button TEXTRIGHT ESC D like left arrow button SCREENLEFT ESC E unused ESC F unused ESC G unused ESC H Go to end of file ENDFILE ESC I unused ESC J Go down and right several lines CHARDOWNRIGHTLOTS ESC K Go down and left several lines CHARDOWNLEFTLOTS ESC L Go up and left several lines CHARUPLEFTLOTS ESC M Go left a quarter screen CHARLEFTLOTS ESC N Go to previous cross reference PREVIOUSHELP ++ ESC O Go to middle column of screen, SCREENMIDDLE on current line. On VT100 initiates special sequences ESC P Delete character under cursor DOTDELETE ESC Q Delete line to left of cursor CLEARHEAD ESC R Delete whole line LINEDELETE ESC S unused ESC T unused ESC U unused ESC V unused ESC W unused ESC X unused ESC Y unused ESC Z unused -- + ESC followed by a control character ------------------------------ Here ^A means CTRL-A: Key Function VED Procedure --- -------- ------------- ESC ^A SCREENUP ESC ^B ESC ^C ESC ^D Calls VED_SWITCHMODE_IM in "im". ENTER switchhmode_im ESC ^E ESC ^F Move right one character CHARRIGHT ESC ^G Go to commandline ENTER ESC ^H ESC BS (use back space button or ^H) ENTER xup Scroll the other window up a page. ESC ^I ESC TAB (use TAB key or ^I). Move cursor TABRIGHT right to next tab position ESC ^J ESC LF (use LF button or ^J) scroll the ENTER xdn other window down a page ESC ^K See The "kill" table facilities below. ++ ESC ^L Refresh screen REFRESH ESC ^M ESC RETURN (or ^M) Go to commandline ENTER ++ ESC ^N unused ESC ^O Not available. ^O trapped by VMS ESC ^P Mark current procedure ENTER mcp ++ ESC ^Q Not available. ^Q trapped by VMS ESC ^R unused (used by VMS and Unix) ESC ^S Not available. ^S trapped by VMS and Unix ESC ^T Swap two characters to left of cursor ENTER sw ++ ESC ^U Yank last word or part line ENTER yankw ++ ESC ^V unused ESC ^W Yank last word or part line ENTER yankw ++ ESC ^X not available. VMS traps ^X ESC ^Y not available. ^Y causes process to abort. ESC ^Z End immediate mode ENTER end_im (NOT available to Unix users who use ^Z as the suspend character) -- + ESC followed by other symbols ------------------------------------ (NB several of these are redefined for particular terminals) Key Function VED Procedure --- -------- ------------- ESC ! Delete word to left WORDLEFTDELETE ESC " Delete word to right WORDRIGHTDELETE ESC # Go into or out of static mode SETSTATIC ESC $ Set beginning of marked range MARKLO ESC % Mark current line as end of range MARKHI ESC & Move range to after current line ENTER m ESC ' Push current position PUSHKEY ESC ( Pop last stacked position POPKEY ESC ) Insert line above current line LINEABOVE ESC * Insert line below current line LINEBELOW ESC + PUSH position onto position stack PUSHKEY ESC , Cut text between two stacked ENTER cut ++ positions ESC - POP position on position stack POPKEY (Compare with ESC p) ESC . Splice in text removed by ENTER cut ENTER splice ++ ESC / Search forward for last search string ENTER re_search ESC 0 ESC 1 Move up and right several lines CHARUPRIGHTLOTS ESC 2 Move right a quarter screen CHARRIGHTLOTS ESC 3 Complete file name to left of cursor FILECOMPLETE ++ ESC 4 ESC 5 ESC 6 ESC 7 Yank word or part line deleted ENTER yankw ESC 8 Yank last line deleted ENTER yankl ESC 9 Yank last range deleted ENTER y ESC : Justify current procedure ENTER jcp ++ ESC ; Justify and align current para. ENTER jjp ++ ESC < Convert word to lower case. ENTER lcw ++ ESC = Right Justify current paragraph ENTER jp ++ ESC > Convert word to upper case. ENTER ucw ++ ESC ? used to initiate special sequences "vedquerytable" produced by some keypads ESC @ Show a key binding ENTER hk ++ ESC [ Usually start of a special sequence ESC \ Search back for last search string ENTER re_backsearch ESC ] Go to right hand edge of screen SCREENRIGHT ESC ^ Go to start of text in line TEXTLEFT ESC _ unused ESC ` unused ESC { Go to start of marked range MARKFIND ++ ESC | Delete marked range ENTER d ++ ESC } Go to end of marked range ENDRANGE ++ ESC ~ unused ESC DEL unused -- Longer Sequences --------------------------------------------------- On the VISUAL 200 VED puts the keypad into a special mode in which some of the keys translate a three character sequence starting with <ESC> ? See HELP * VEDKEY5 for information about a convenient alteration of the keypad on the Visual 200. On the VT100 the three character sequences start with <ESC> O. -- The "kill" table --------------------------------------------------- Sequences starting ESC ^K are used to kill (delete) or retrieve text. Key Function VED Procedure --- -------- ------------- ESC ^K ^B Delete word to left of cursor WORDLEFTDELETE ++ ESC ^K ^F Delete word to right of cursor WORDRIGHTDELETE ++ ESC ^K ^A Delete line to left of cursor CLEARHEAD ++ ESC ^K ^E Delete line to right of cursor CLEARTAIL ++ ESC ^K ^K Delete current line LINEDELETE ++ ESC ^K ^D Delete marked range ENTER d ++ ESC ^K ^P Delete region between stacked positions ENTER cut ++ NOTE that the default bindings have these as "undelete" operations, and make the corresponding "delete" ones all start without the ESC. See HELP * VEDKEYS. -- Tailoring VED ------------------------------------------------------ For information on tailoring VED for different terminals, see HELP * TERMINAL HELP * INITIAL REF * VEDTERMINALS HELP * VEDSET HELP * VEDXTERM Using VED in an xterm window HELP * HPXTERMKEYS Using VED on HP workstations in an xterm window. HELP * LOGICAL_KEYS Describes the "logical" names used in various documentation files to describe VED functions that can be invoked from the keyboard. HELP * DK Defining new key mappings interactively HELP * VEDMACROS Defining new VED "ENTER" commands --- C.all/help/vedoldkeys --- Copyright University of Sussex 1993. All rights reserved. ----------