/sys$common/syshlp/DBG$HELP.HLB  —  DEBUG  DEFINE  /KEY
    Assigns a string to a function key.

                                   NOTE

       This command is not available in the VSI DECwindows Motif for
       OpenVMS user interface to the debugger.

    Format

      DEFINE/KEY  key-name "equivalence-string"

1  –  Parameters

 key-name

    Specifies a function key to be assigned a string. Valid key names
    are as follows:

    Key       LK201
    Name      Keyboard      VT100-type    VT52-type

    PF1       PF1           PF1           Blue
    PF2       PF2           PF2           Red
    PF3       PF3           PF3           Black
    PF4       PF4           PF4
    KP0-KP9   Keypad 0-9    Keypad 0-9    Keypad 0-9
    PERIOD    Keypad        Keypad
              period (.)    period (.)
    COMMA     Keypad comma  Keypad comma
              (,)           (,)
    E1        Find
    E2        Insert Here
    E3        Remove
    E4        Select
    E5        Prev Screen
    E6        Next Screen
    HELP      Help
    DO        Do
    F6-F20    F6-F20

    On LK201 keyboards:

    o  You cannot define keys F1 to F5 or the arrow keys (E7 to E10).

    o  You can define keys F6 to F14 only if you have first entered
       the DCL command SET TERMINAL/NOLINE_EDITING. In that case, the
       line-editing functions of the left and right arrow keys (E8
       and E9) are disabled.

 equivalence-string

    Specifies the string to be processed when you press the specified
    key. Typically, this is one or more debugger commands. If the
    string includes any space or nonalphanumeric characters (for
    example, a semicolon separating two commands), enclose the string
    in quotation marks (").

2  –  Qualifiers

2.1    /ECHO

       /ECHO (default)
       /NOECHO

    Controls whether the command line is displayed after the key has
    been pressed. Do not use /NOECHO with /NOTERMINATE.

2.2    /IF_STATE

       /IF_STATE=(state-name[, . . . ])
       /NOIF_STATE (default)

    Specifies one or more states to which a key definition applies.
    The /IF_STATE qualifier assigns the key definition to the
    specified states. You can specify predefined states, such as
    DEFAULT and GOLD, or user-defined states. A state name can be
    any appropriate alphanumeric string. The /NOIF_STATE qualifier
    assigns the key definition to the current state.

2.3    /LOCK_STATE

       /LOCK_STATE
       /NOLOCK_STATE (default)

    Controls how long the state set by /SET_STATE remains in effect
    after the specified key is pressed. The /LOCK_STATE qualifier
    causes the state to remain in effect until it is changed
    explicitly (for example, with a SET KEY/STATE command). The
    /NOLOCK_STATE qualifier causes the state to remain in effect
    only until the next terminator character is typed, or until the
    next defined function key is pressed.

2.4    /LOG

       /LOG (default)
       /NOLOG

    Controls whether a message is displayed indicating that the key
    definition has been successfully created. The /LOG qualifier
    displays the message. The /NOLOG qualifier suppresses the
    message.

2.5    /SET_STATE

       /SET_STATE=state-name
       /NOSET_STATE (default)

    Controls whether pressing the key changes the current key state.
    The /SET_STATE qualifier causes the current state to change to
    the specified state when you press the key. The /NOSET_STATE
    qualifier causes the current state to remain in effect.

2.6    /TERMINATE

       /TERMINATE
       /NOTERMINATE (default)

    Controls whether the specified string is terminated (processed)
    when the key is pressed. The /TERMINATE qualifier causes the
    string to be terminated when the key is pressed. The /NOTERMINATE
    qualifier enables you to press other keys before terminating the
    string by pressing the Return key.

3  –  Description

    Keypad mode must be enabled (SET MODE KEYPAD) before you can use
    this command. Keypad mode is enabled by default.

    The DEFINE/KEY command enables you to assign a string to a
    function key, overriding any predefined function that was bound
    to that key. When you then press the key, the debugger enters
    the currently associated string into your command line. The
    DEFINE/KEY command is like the DCL command DEFINE/KEY.

    For a list of the predefined key functions, see the Keypad_
    Definitions_CI online help topic.

    On VT52- and VT100-series terminals, the function keys you can
    use include all of the numeric keypad keys. Newer terminals and
    workstations have the LK201 keyboard. On LK201 keyboards, the
    function keys you can use include all of the numeric keypad keys,
    the nonarrow keys of the editing keypad (Find, Insert Here, and
    so on), and keys F6 to F20 at the top of the keyboard.

    A key definition remains in effect until you redefine the key,
    enter the DELETE/KEY command for that key, or exit the debugger.
    You can include key definitions in a command procedure, such as
    your debugger initialization file.

    The /IF_STATE qualifier enables you to increase the number of
    key definitions available on your terminal. The same key can be
    assigned any number of definitions as long as each definition is
    associated with a different state.

    By default, the current key state is the DEFAULT state. The
    current state can be changed with the SET KEY/STATE command,
    or by pressing a key that causes a state change (a key that was
    defined with DEFINE/KEY/LOCK_STATE/SET_STATE).

    Related commands:

       DELETE/KEY
       (SET,SHOW) KEY

4  –  Examples

    1.DBG> SET KEY/STATE=GOLD
      %DEBUG-I-SETKEY, keypad state has been set to GOLD
      DBG> DEFINE/KEY/TERMINATE KP9 "SET RADIX/OVERRIDE HEX"
      %DEBUG-I-DEFKEY, GOLD key KP9 has been defined

      In this example, the SET KEY command establishes GOLD as
      the current key state. The DEFINE/KEY command assigns the
      SET RADIX/OVERRIDE HEX command to keypad key 9 (KP9) for the
      current state (GOLD). The command is processed when you press
      the key.

    2.DBG> DEFINE/KEY/IF_STATE=BLUE KP9 "SET BREAK %LINE "
      %DEBUG-I-DEFKEY, BLUE key KP9 has been defined

      This command assigns the unterminated command string "SET BREAK
      %LINE" to keypad key 9 for the BLUE state. After pressing BLUE-
      KP9, you can enter a line number and then press the Return key
      to terminate and process the SET BREAK command.

    3.DBG> SET KEY/STATE=DEFAULT
      %DEBUG-I-SETKEY, keypad state has been set to DEFAULT
      DBG> DEFINE/KEY/SET_STATE=RED/LOCK_STATE F12 ""
      %DEBUG-I-DEFKEY, DEFAULT key F12 has been defined

      In this example, the SET KEY command establishes DEFAULT as
      the current state. The DEFINE/KEY command makes the F12 key
      (on an LK201 keyboard) a state key. Pressing F12 while in
      the DEFAULT state causes the current state to become RED. The
      key definition is not terminated and has no other effect (a
      null string is assigned to F12). After pressing F12, you can
      enter "RED" commands by pressing keys that have definitions
      associated with the RED state.
Close Help