The DEFINE/KEY command associates a string with a particular key on your keyboard. Format: DEFINE/KEY key-name string [/qualifiers] See also SHOW KEY and DELETE/KEY.
1 – Parameters
The command has the following mandatory parameters. key-name Specifies the name of the key that you are defining. string Specifies the character string to be processed when you press the specified key. Enclose the string in double quotes to preserve spaces and lower case characters.
2 – Command qualifiers
The command has the following qualifiers: /ECHO /IF_STATE /LOCK_STATE /SET_STATE /TERMINATE
3 /ECHO
/ECHO /NOECHO Specifies whether the command line is echoed to the screen when you press the defined key. The default is /ECHO.
4 /IF_STATE
/IF_STATE=(state,...) /NOIF_STATE Specifies a list of states, at least one of which must be set for the specified key definition to work.
5 /LOCK_STATE
/LOCK_STATE /NOLOCK_STATE Specifies that the state set by the /SET_STATE qualifier remains in effect until a DEFINE/KEY/NOSET_STATE command is issued to unset the state. The default is /NOLOCK_STATE, meaning that the effect of /SET_STATE lasts only until the next definable key that you press or the next read-terminating character that you type.
6 /SET_STATE
/SET_STATE=state /NOSET_STATE Specifies that the named state is set when the specified key is pressed. The state name can be any alphanumeric string. The default is /NOSET_STATE, meaning that the current locked state is unset when the key is pressed. See the description of the DCL command DEFINE/KEY in your VMS documentation for more information about key states.
7 /TERMINATE
/TERMINATE /NOTERMINATE Specifies whether the string executes when you press the specified key. The default is /NOTERMINATE, which means that you can press other keys before the command string is processed.
8 – Default key definitions for CTF
The default key definitions for CTF are as follows: Key CTF Function --- ------------ HELP HELP PF2 HELP KEYPAD DEFAULT PF3 SHOW KEY/ALL KP0 NEXT KP2 START KP3 STOP KP4 ANALYZE/DATA=ASCII/NOSELECT/NODISPLAY/NOTRUNCATE KP6 ANALYZE/DISP=ALL/WIDTH=132 KP7 ANALYZE/DATA=ASCII KP8 ANALYZE/DATA=HEXADECIMAL KP9 ANALYZE/DATA=OCTAL MINUS ANALYZE/DATA=DECIMAL COMMA ANALYZE/TRUNCATE PERIOD BACK NEXT_SCREEN NEXT PREV_SCREEN BACK CTRL/L CLEAR CTRL/W REFRESH GOLD COMMA ANALYZE/NOTRUNCATE GOLD KP0 ANALYZE/SCROLL GOLD KP2 START/LIVE GOLD KP6 ANALYZE/NODISPLAY GOLD NEXT_SCREEN ANALYZE/SCROLL
9 – Examples
CTF> DEFINE/KEY KP2 "START/LIVE/NOCOLLECT/TERMINATE" Causes KP2 to start live snapshot tracing. CTF> DEFINE/KEY KP2/IF_STATE="GOLD" "START/NOCOLLECT/TERMINATE" Causes GOLD KP2 to start detached snapshot tracing.