HP-UX Reference (11i v1 00/12) - 4 File Formats (vol 8)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man4/!!!intro.4
________________________________________________________________
___ ___
s
softkeys(4) softkeys(4)
enable count Selecting this softkey will enable count softkey nodes to the right of this
one - default is 0.
{filtercommand} This node is only active for filters or commands, respectively - default is
either.
{motorolaprecision}
This node is only active when keysh is running on a Motorola (MC680x0)
or precision (PA-RISC) processor, respectively - default is either.
disabled This node starts out disabled and must be enabled to be used - default is to
start out enabled.
automatic The command will be entered automatically when this node is selected.
editrule editrule The editrule for this node.
cleanuprule editrule An editrule to be executed after all other editrules associated with this soft-
key command - only one cleanuprule is allowed per softkey command.
hint string The one line hint for this node - only valid for ‘‘string’’ softkey nodes.
help helptext The help for this node (may be more than one line).
required string The one-line error message to display if this node is not selected.
Arguments are as follows:
count A signed integer, the word none, or the word all.
editrule An editrule (described below).
helptext nroff-style help enclosed in quotes (also described below).
string An arbitrary string enclosed in quotes. Note that within quotes, \ escapes the next
character as when using awk(1).
A typical backup softkey node definition resembles:
backup softkey softkey [literal literal ] ;
where literal is the literal text string to program the terminal function key with (if different than softkey).
An unquoted hash-mark character (
#) in a softkey file delimits a comment to the end of the line.
Softkey Command Translation
To translate softkey commands into HP-UX commands, keysh executes the editrules associated with each
softkey selected by the user. These editrules create a word list via an awk-like editing language. This
translated word list is then passed to the shell for execution.
For a simple translation, this list might resemble:
ls -l ∗∗.c
word[0] word[1] word[2]
Every time an editrule is invoked, the special constants last and next are defined to the index of the
last word in the list (‘‘2’’ in this example) and the would-be-next word in the list (‘‘3’’ in this example),
respectively. In addition, the constant
argument is set equal to the user input for the softkey (e.g., *.c
for the softkey corresponding to the file name in this example).
Note that keysh automatically casts numbers and strings back and forth as necessary to carry out edi-
trules. Also, variables are cleared only before the first editrule associated with a softkey command. All
assigned variables are available to subsequent editrules.
Editrules
An editrule is a list of edit statements enclosed in curly-braces (i.e., { and } ).
An edit statement is:
• an expression followed by a ;,
• an if statement, or
Section 4−−282 − 2 − HP-UX Release 11i: December 2000
___
___