14
QTERM-R55 User's Manual
QSI Corporation Fax 801-466-8792 Web www.qsicorp.com Phone 801-466-8770
Example 10 program illustrates the
led
commands.
2.8.6
Display Contrast
The display contrast may be adjusted with the
contrast
commands (see Example 10):
contrast up
contrast down
The new contrast setting persists until the terminal is pow-
ered down. To permanently adjust the contrast of the dis-
play, use the Power-On Setup facility (see section 1.1).
2.8.7
Display Backlight
The display backlight may be turned on and off with the
backlight
commands (see Example 10):
backlight on
backlight off
2.8.8
Key Click
If enabled, the Key Click feature causes the terminal
speaker to emit a short beep whenever a key on the keypad
is pressed. This feature may be turned on and off with the
following commands:
keyclick on
keyclick off
The Key Click setting persists until the terminal is powered
down. The default setting (when the terminal is powered
on) can be selected in the Power-On Setup facility (see sec-
tion 1.1).
2.8.9
Keypad Backlight
If the QTERM-R55 was purchased with the keypad back-
light option, the keypad backlight may be turned on and off
with the keypad commands:
keyback on
keyback off
2.8.10
Speaker
The internal speaker beeps in response to either of the fol-
lowing commands (see Example 10):
beep
bell
2.8.11
Pause Execution
The following identical commands delay program execu-
tion (see Example 7):
pause <time>
wait <time>
<time>
is the amount of time execution is delayed in sec-
onds.
2.8.12
Defining the Keyboard
Input from the keyboard can be done in two ways. The first
method is to check periodically if there has been a key
pressed by using the iskeypressed$ string function. If there
has been a key pressed, the resulting string from this func-
tion will be the value of the key that was pressed. Other-
wise, the string will be empty. Here is an example of how
this function can be used.
inChar$ = iskeypressed$
if (len(inChar$) <> 0) then
send #COM1 inChar$
endif
The other method of getting input from the keypad is to use
the inkey$ string function. This function will stop execu
tion of the BASIC program until the user of the terminal
presses a key on the keypad. When he does, the value of the
key is returned as the result.
print inkey$
The keyboard has a default definition for characters that are
returned to the input functions. This definition contains the
characters that are printed on the standard legend; see Fig-
ure 2-1. However, as the QTERM-R55 legends are com-
pletely customizable, a qaBASIC facility has been created
to allow for redefinition of the characters that are returned
by input functions when keys are pressed. The command to
accomplish this is described below.
keydef[release][shift] <col>,<row>,<string$>
This command redefines the key at location (col, row),
where col and row are the one-based column and row of the
key on the keypad. For example, the upper left key on
the 40-key keypad is key 1,1, and the lower right key is key
5,8. The
string$
is sent to the BASIC input functions
when the key is pressed. The optional release and shift
modifiers change the definition for a key release event and/
or a shifted key event.