Specifications

Commands - 57
INPUT KEYPAD$
Statement
SYNTAX: INPUT KEYPAD$ echo port,variable
INPUT KEYPAD$ echo port,"text",variable
INPUT KEYPAD$ echo port,"text";variable
PURPOSE: To input data from a keypad. Optionally print text to echo port
REMARKS: The INPUT KEYPAD$ statement is similar to the INPUT statement in that the program pauses to
accept data from a matrix keypad.
The echo port parameter tells the system where to echo the keys pressed on the keypad. The display
must be previously initialized for an echo.
0 no echo
1 COM1
2 COM2
3-8 no echo
9 DP display
10 LCD display
11 speaker
12-255 no echo
The INPUT KEYPAD$ statement terminates when a carriage return (<CR>) is received. One of
the keypad keys must be configured to return a <CR>(13 or&D) when pressed using the SYS(8)
command. By default, key position 15 returns a <CR>. A <CR><LF> sequence is sent to the
echo port when a <CR> is sent. On all echo ports, except the LCD display, the line advances. The
cursor returns back to the beginning of the line on LCD's.
"text" is optionally printed to the echo port. This is usefull as part of a prompt. The character
following the last quotation (") determines if a question mark (?) is printed or not. A comma (,)
supresses printing a ? while a semi-colon (;) will print one.
This command must be initialized by ON KEYPAD$. When INPUT KEYPAD$ is executed, the
subroutine specified in ON KEYPAD$ is not executed. Even if you use INPUT KEYPAD$ as your
only keypad input, you must have a valid line number specified as part of the ON KEYPAD$ routine.
variable is a string (for example, NAME$) or numeric (for example, WEIGHT). As with the regular
INPUT statement, any string characters entered into a numeric variable prompts for a redo. LCD
displays do not promt for a redo, but the cursor returns back to the point where it is requesting data.
RELATED: KEYPAD$, ON KEYPAD$