Compatible with:
DOS Maximite CMM MM150 MM170 MM+ MMX Picromite ArmiteL4 Armite F4 ArmiteH7 CMM2

KEYPAD var, int, r1, r2, r3, r4, c1, c2, c3 [, c4]

Monitor and decode key presses on a 4x3 or 4x4 keypad. 
Monitoring of the keypad is done in the background and the program will continue after this command without interruption. 
'var' should be a numeric variable and its value will be updated whenever a key press is detected. 
'int' is a user defined subroutine that will be called when a new key press is received. In the interrupt subroutine the program can examine the variable 'var' and take appropriate action. 
r1, r2, r3 and r4 are pin numbers used for the four row connections to the keypad and c1, c2, c3 and c4 are the column connections. c4 is optional and is only used with 4x4 keypads. 
This command will automatically configure these pins as required. On a key press the value assigned to 'var' is the number of a numeric key (eg, '6' will return 6) or 10 for the * key and 11 for the # key. 
On 4x4 keypads the number 20 will be returned for A, 21 for B, 22 for C and 23 for D. 
The KEYPAD CLOSE command will terminate the keypad function and return the I/O pin to a not configured state. 
See the chapter "Special Hardware Devices" in the Micromite manual for more details.


Last edited: 06 October, 2020