KEY subprogram
CALL
KEY
(key-unit, return-variable, status-variable)
The
KEY
sulJprogralIl
alluw::;
yuu tu
II
all::;[el
Ulle
ellal
aetel
[I
um
the
keyboard
directly to
YDur
program.
This
eliminates the need for
an
INPUT
statement
and
saves time in getting
data
from a single
key
into memory
Because
the
character
represented
by
the key
pressed
is not displayed
on
the screen, the information
already
on
the
screen
is
not
disturbed
by performing the
CALL
KEY
statement.
The
key'unit, which indicates which
keyboard
is the
input device, is a
numeric
expression which,
when
evaluated,
has
a
value athrough
S,
as
shown
below:
• 0 = console
keyboard,
in
mode
previously specified by
CALL
KEY
• 1 = left side of console
keyboard
or
remote
contrail
• 2 = right side of console
keyboard
or
remote
control 2
.3,4,5
- specific modes for console
keyboard
A
key-unit
of
0
remaps
the
keyboard
in
whatever
mode
was
specified in
the
previous CALL KEY
program
line.
Key-units of 1
and
2
are
used
for a
split·keyboard
scan.
when
you
want
to
separate
the
console
keyboard
into two
smaller
duplicate
keyboards
Dr
when
you
are
using the remDte controller
firebuttons
as
input
devices_
Specifying
3,4,
or
5
as
key-unit
maps
the
keyboard
to
a
particular
mode of operatiDn.
The
keyboard
mode
you specify
determines the
character
codes
returned
by
certain
key::;.
A key-unit
of
3 places the
computer
in the
standard
TI-99/4
keyboard
mode. (Most
Command
Moclnlf': I".oftware uses this
mode.) In this mode, both upper-
and
lower-case alphabetical
characters
are
returned
by the
computer
as upper-case only,
and
the
function
keys
(BACK,BIIGIN,CLIIAR,
etc_)
return
codes 1
through 1
S.
No control
characters
are
active.
A
key-unit
of
4
remaps
the
keyboard
in
the
Pascal
mode. Here,
both upper-
and
lower-case alphabetical
character
codes
are
returned
by the
computer,
and
the function
keys
return
codes
ranging from 129 through
143.
The
control
character
codes
are
1
throuf?;h
31.
A
key'unit
of
5 places the
keyboard
in the BASIC mode. Both
U1J1JCI
-
dud
lower-case
alphabetical
character
codcs
are
returned
by the
computer.
The
function
key
codes
are
1 through 15,
and
the
control
key
codes
are
128
through 159 (and 187).
User's
Reference
Guide
Examples:
11-87