11 - 88 11 - 88
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
INKEY$
Function
INput KEY $
• Returns the character if there is an input from the keyboard, or returns an empty character
string (“ “) if there is no input.
Syntax
INKEY$
Examples
A$=INKEY$
• • • •
Assigns the character to A$ if there is a keyboard
input, or assigns an empty character string (“ “) to A$
if there is no input.
Description
• The INKEY$ function returns the character if there is a key input from the keyboard
specified by ZIDV instruction, or returns an empty character string if there is no input. It is
not displayed on the screen, however.
• All the keys except for the following keys can be entered from the keyboard that is
specified as a console.
Ctrl + C , Ctrl + S , Break key (Processes exactly as key operation.)
Keys that correspond to 00
H
, 80
H
, and FD
H
to FF
H
• All the keys can be entered from the keyboard other than the console (a console
connected to the communication port), except for the keys that correspond to the 00h
code and keys that correspond to the DC1/DC3 codes that were specified by the ZCNTL
instruction.
• The new line character and others, which cannot be entered by the INPUT instruction and
LINE INPUT instruction, can also be entered by the INKEY$ instruction.
If the 03
H
code (BREAK code) is entered from a keyboard other than the console keyboard
(a terminal connected to the communication port), the BASIC program reads it as data.
Therefore, note that the BASIC program cannot be stopped.