Defining Keys Programmatically; Programmatically - HP 2624 Manual

Display terminals
Table of Contents

Advertisement

Keyboard Control
user keys menu supplies the upper portion of the
particular key label while the second supplies the lower
portion. When defining a key label, you may use al-
ternate character sets and any of the video
enhancements if you so desire (up to three enhancement
or character set changes per 8-character label segment).
KEY DEFINITION FIELD. The entire line im-
mediately below the attribute and label fields is
available for specifying the character string that is to be
displayed, executed, and/or transmitted whenever the
particular key is either physically pressed or
programmatically triggered. When entering characters
into this field, you may use display functions mode,
alternate character sets, and any of the video
enhancements if you so desire.
When entering the label and key definition, you may
access the alternate character sets by way of the
"modi fy
char !5et"
function key
(D),
the display enhancements
by way of the
"enhence Video"
function key ( . . ), and
display functions mode by way of the
"DISPLAY FUNCTNS"
-function key
(m).
Note that this implementation of dis-
play functions mode is separate from that which is
enabled/disabled via the mode selection keys.
Note that when the user keys menu is displayed on the
screen, the _
key definition is temporarily disabled so
that you can use that key for including
<CR>
codes (with
display functions mode enabled) in key definitions. If auto
line feed mode is also enabled, the _
key will generate a
<CR><LF> •
When the user keys menu is displayed on the screen, you
may use the
l1li, 1/1
,and •
keys for editing the content
of the label and key definition fields.
When you are finished defining all the desired keys, press
the . ,
III,
or
III
key (in all three cases the user keys
menu disappears from the screen). Whenever you press
III
the defined user key labels are displayed across the bottom
of the screen and the
D -. .
user keys, as defined by
you, are enabled.
Defining Keys Programmatically
From a program executing in a host computer, you can
define one or more keys using the following escape se-
quence format:
<ESC>&f
<attribute><key><labellength>
<!5tringlength><label><!5tring>
where:
3-6
<attribute>
<key>
<label length>
<5tring length>
Oa: normal
(0 is the default)
1a: local only
2a: transmit only
Ok:
RETURN
key
(1 is the default)
1-8k: f1-f8, respectively
o
through 160d
(0 is the default)
-1 through 1601 (-1 clears the string;
1 is the default)
<label>
<5tring)
the character sequence for the
label field
the character sequence for the
key definition field
The
<ettribute>, <key>, <label length>,
and
<!5tring
length>
parameters may appear in any sequence but must
preceed the label and key definition strings. You must use
an uppercase identifier
(A, K, D,
or
L)
for the final pa-
rameter and a lowercase identifier (a,
k,
d, or l) for all
preceding parameters. Following the parameters the first
0-160 characters, as designated by
<lebel length>,
con-
stitute the key's label and the next 0-160 characters, as
designated by
<!5tring length>,
constitute the key's
definition string. Any display enhancement escape se-
quences within the key label or definition strings are
automatically translated into implicit escape sequences by
the terminal. The total number of displayable characters
(alphanumeric data, ASCII control codes such as
<CR>
and
<LF>,
and explicit escape sequence characters) in the label
string must not exceed 16 and in the definition string must
not exceed 80. Also the sum of the
<label length>
and
<!5tringlength>
parameters must not exceed 160.
Example: Assign
LOG-ON
as the label and
HELLO
USER. ACCOUNT
as the definition for the . .
user key. The key is to have the attribute
"N".
<ESC>&f5k6d19LLOG-ONHELLOUSER.ACCOUNT<CR>
After issuing the above escape sequence from your pro-
gram to the terminal, the . . portion of the user keys
menu is as follows:
f5 N LABEL LOG-ON
HELLO USER. ACCOUNT<CR>
If the transmit only attribute (2) is designated, the par-
ticular user key will have no effect unless the terminal is in
remote mode. A transmit only user key will (when sub-
sequently pressed) invoke a block transfer handshake and
append the appropriate terminator to the string.
Controlling the
User Keys Menu Programmatically
From a program executing in a host computer, you can
display the user keys menu on the screen and remove it
from the screen using the following escape sequences:
DISPLAY MENU:
<ESC>
j
REMOVE MENU:
<ESC>k
Triggering the
User Keys Programmatically
From a program executing in a host computer, you can
trigger the execution of the _
key or a user key by using
the following escape sequence:
<ESC>&f <0-8>E
c
(
(

Advertisement

Table of Contents
loading

Table of Contents