HELP XVEDKEYS                                           Adrian Howard Jun 1991
                                               Updated: Adrian Howard Aug 1992
                                               Updated: Aaron Sloman July 2003

Some of the Key Bindings were changed in July 2003
The old ones are described in HELP OLDXVEDKEYS and can
be restored by doing
    uses oldvedxvedkeys
    oldvedxvedkeys();


A guide to the default key bindings for XVed.
See also HELP * VEDXTERMKEYS (This includes a diagrammatic display).

         CONTENTS - (Use <ENTER> g to access required sections)

 -- INTRODUCTION
 -- NOTATION
 -- INTERACTIONS BETWEEN MOTIF AND XVED
 -- KEY BINDINGS
 -- Additional functions
 -- RELATED DOCUMENTATION

-- INTRODUCTION -------------------------------------------------------

XVed will normally attempt to determine the type of keyboard it is
attached to and apply appropriate key bindings. If XVed cannot identify
a keyboard then the bindings in the source file SRC * VEDXVEDKEYS.P are
used. This file gives a description of the default key bindings supplied
by this library.


-- NOTATION -----------------------------------------------------------

The descriptions of the key bindings use the following notation:

    ^A
    The single character generated by pressing the <CTRL> key and the
    "A" key simultaneously.

    ESC A
    The sequence of pressing and releasing the <ESCAPE> (ESC) key and
    then pressing the "A" key.

    META A
    The sequence generated by pressing the <META> modifier key
    and the "A" key simultaneously. The META key is sometimes marked
    "Left" or "Alt". These bindings should hold true for all XVed
    keyboard types.

    KP-X (Where X is one of 0 to 9)
    The "X" key on the keypad (usually on the right hand side of the
    keyboard. On some laptop computers these are invoked by holding down
    a function key and pressing a key with the appropriate label.

Note: alternative names for the keypad keys KP-0 to KP-8 and the Dot
(KP_Decimal) key are as shown in this configuration:

    KP_Home (7)   KP_Up    (8)   KP_Prior (9)
    KP_Left (4)   KP_Begin (5)   KP_Right (6)
    KP_End  (1)   KP_Down  (2)   KP_Next  (3)
    KP_Insert (0) KP_Delete (.)


    fN
    Function key N. The amount and names of function keys vary from
    keyboard to keyboard.

    LF
    The line-feed key.
        Often not included. This can be emulated as ^J

    BS
    The back-space key.
    Usually above the RETURN key. Usually the same as ^h

    DEL
    The delete or erase key.
    On PC keyboards this is usually to the right of the RETURN key,
    in the middle keypad cluster

    UP, DOWN, LEFT, RIGHT
    The normal cursor keys, marked by arrows. On PC keyboards and many
    others these form a group to the right of the main key cluster.
    These are duplicated on the numeric keypad on the right of most
    keyboards, i.e. keys 8, 2, 4 and 6.

    PRIOR, NEXT, HOME, END, INSERT
    The first two are sometimes labelled:
    PAGEUP, PAGEDOWN,
    These keys vary from keyboard to keyboard and may not exist as a
    single key press, or may have a different name from the ones given above.
    The names used here are those from the logical KeySym names used in
    the X window system.


-- INTERACTIONS BETWEEN MOTIF AND XVED --------------------------------

If you are using Motif there is a possibility that there will be
interactions between the Motif "virtual key bindings" and your XVed
keyboard setup. For example most Motif systems have the function key f10
bound to the the virtual key osfMenuBar which cause keyboard focus to
move to the first item on the menu bar. This process will override any
binding XVed places on the key.

One way of overcoming this is to rebind the XVed function to another key
using the normal methods (see HELP *VEDSET.)

Another would be to change which key is used to switch to the menu bar.
You can do this by altering the menuAccelerator resource of the menu bar
in XVed. For more information see REF *RowColumnWidget. As an example
adding the following to your resource file would cause the key
combination Shift-f10 intead of osfMenuBar to be used to shift focus to
the menu bar:

    XVed*menuAccelerator: Shift <Key>F10

You could also redefine which key osfMenuBar is bound to. If you are
using the MWM window manager you could add the following line to your
".motifbind" file:

    osfMenuBar  :Shift  <Key>F10

This would redefine osfMenuBar as Shift-f10, instead of f10 (for more
information see the manual for MWM.)

Altering your ".motifbind" file will alter the behaviour of the virtual
key bindings in all the Motif applications which you are using. If you
would prefer to alter just the behaviour of XVed you could instead alter
the resource named defaultVirtualBindings. For example the following
would again redefine osfMenuBar as Shift-f10.

    XVed*defaultVirtualBindings: \
        <... other virtual bindings...>
        osfMenuBar :Shift  <Key>F10\n\
        <... other virtual bindings...>

For more information see man 3 VirtualBindings under Motif.


-- KEY BINDINGS -------------------------------------------------------

In the following 'text selection' refers to a highlighted portion of text
selected using the mouse. The 'Clipboard' is a hidden location where some
previously selected text may be stored.

Key         Function                                XVed Procedure
---         --------                                --------------

META X      Cut the text selection from the file    vedcut_selection
META C      Copy selected text to the clipboard     vedcopy_selection
META V      Paste the clipboard into the document   vedpaste_selection
META D      Compile the text on the clipboard       vedcompile_selection
META H      -vedgetsysfile- from the clipboard      vedhelpon_selection
META M      Toggles the menubar on and off          -
META S      Toggles the scrollbar on and off        -

UP          Move cursor up one char                 vedcharup
DOWN        Move cursor down one char               vedchardown
LEFT        Move cursor left one char               vedcharleft
RIGHT       Move cursor right one char              vedcharright

ESC UP      Move cursor up several lines            vedcharuplots
ESC DOWN    Move cursor down several lines          vedchardownlots
ESC LEFT    Move cursor left several lines          vedcharleftlots
ESC RIGHT   Move cursor right several lines         vedcharrightlots

KP-8        Move cursor up one char                 vedcharup
KP-2        Move cursor down one char               vedchardown
KP-4        Move cursor left one char               vedcharleft
KP-6        Move cursor right one char              vedcharright

KP-5        Move current line to middle of window   vedmidwindow

KP-7        Move cursor north-west one char         vedcharupleft
KP-9        Move cursor north-east one char         vedcharupright
KP-1        Move cursor south-west one char         vedchardownleft
KP-3        Move cursor south-east one char         vedchardownright

ESC KP-8    Move cursor up several lines            vedcharuplots
ESC KP-2    Move cursor down several lines          vedchardownlots
ESC KP-4    Move cursor left several lines          vedcharleftlots
ESC KP-6    Move cursor right several lines         vedcharrightlots

ESC KP-7    Move cursor north-west several chars    vedcharupleft
ESC KP-9    Move cursor north-east several chars    vedcharupright
ESC KP-1    Move cursor south-west several chars    vedchardownleft
ESC KP-3    Move cursor south-east several chars    vedchardownright

ENTER       Move to the status line                 vedenter
KP-0        Move one word to the left               vedwordleft
KP-.        Move one word to the right              vedwordright
KP-+        Switch between buffer and status line   vedstatusswitch
KP--        Redo last command                       vedredocommand

KP-*        Compile current line                    vedloadline
ESC KP-*    Compile marked range                    ved_lmr

KP-/        Show help file for Ved Keys             vedhelpkey
ESC KP-/    Show help for one key                   ved_hkey

NB: chardelete and dotdelete have been swapped since July 2003
to make XVed more like other familiar interfaces.
BS          Delete char to left of the cursor       vedchardelete
^h          Delete char to left of the cursor       vedchardelete

^?          Delete char under cursor                veddotdelete
DEL         Delete char under cursor                veddotdelete

ESC DEL     Join current line to previous line      vedjoinline
ESC BS      Join current line to previous line      vedjoinline

HELP        Get help (defaults to ved_hkeys)        vedhelpkey
ESC HELP    Get help on the purpose of a key        ved_hkey
    (There is no 'Help' Key on most PC keyboards.)

(Next two often labelled PageUp and PageDown)
PRIOR       Move up one screen                      vedprevscreen
ESC PRIOR   Scroll other file up one page           ved_xup
NEXT        Move down one screen                    vednextscreen
ESC NEXT    Scroll other file down one page         ved_xdn

HOME        Move to the top of the file             vedtopfile
ESC HOME    Move to the left edge of text in
            current line                            vedtextleft
END         Move to end of the file                 vedendfile
ESC END     Move to the right edge of text          vedtextright

ESC w       Toggle normal/double length window      vedsetwindow
    (Not useful in XVed)
INSERT      Toggle static mode                      ved_static
ESC INSERT  Insert line above                       vedlineable

f1          Mark start of a marked range            vedmarklo
f2          Mark end of a marked range              vedmarkhi

f3          Delete line to the left                 vedclearhead
f4          Delete the whole line                   vedlinedelete
f5          Delete line to the right                vedcleartail
f6          Delete word to the left                 vedwordleftdelete
f7          Delete word to the right                vedwordrightdelete

f8          Move a marked range                     ved_m
f9          Copy (tanscribe) the marked range       ved_t

f10         Turn on keyboard mode for menus (See section on Motif above)
            If not using Motif, refresh screen (same as ^L)
f11         Push position on position stack         vedpushkey
f12         Swap position with the top of stack     vedexchangeposition


ESC f1      Mark from the start of the file         ved_mbf
ESC f2      Mark from the end of the file           ved_mef

Note: in what follows 'yank a word' is short for 'yank a part line',
i.e. the last deleted word or head or tail of a line:
ESC f3      Yank a word from -vvedworddump-         ved_yankw
ESC f4      Yank a line from -vvedlinedump-         ved_yankl
ESC f5      Yank a word from -vvedworddump-         ved_yankw
ESC f6      Yank a word from -vvedworddump-         ved_yankw
ESC f7      Yank a word from -vvedworddump-         ved_yankw

ESC f8      Move range in from last file            ved_mi
ESC f9      Copy range in from last file            ved_ti

ESC f11     Pop position from position stack        vedpopkey
ESC f12     Clear the position stack                ved_cps


-- Additional functions -----------------------------------------------

Some additional functions are provided in LIB * VEDXTERMKEYS

These two make it easy to move or copy the marked range in the current
file (the mnemonic should be obvious);

    ESC -
        keep one copy of marked range and move it here

    ESC =
        make two copies, by copying to here

-- RELATED DOCUMENTATION ----------------------------------------------

HELP *XVED/Server Keyboard Setup - A description of keyboard setup in
                                   XVed

HELP *XTERMKEYS   - Default key bindings for Ved running in a
                    'dumb terminal' xterm window.

HELP *DXVEDKEYS   - Key bindings for DECwindows terminal
HELP *NCDXVEDKEYS - Key bindings for NCD X terminal
HELP *SUNXVEDKEYS - Key bindings for Sun workstations
HELP *HPXVEDKEYS  - Key bindings for HP workstations


--- C.x/x/ved/help/xvedkeys ------------------------------------------
--- Copyright University of Sussex 2003. All rights reserved. ----------
