Detecting User Input Using PDNT.CLEAR The PDNT.CLEAR instructions clears the pendant display, and returns to the Home 1 screen. Detecting User Input Input from the pendant can be received from a single key press from any of the keys that can be detected. Single-key presses can be monitored in three different modes: l The keys can be monitored like keys on a normal keyboard. l The keys can be monitored in toggle mode (on or off). The state of the key is changed each time the key is pressed. l The keys can be monitored in level mode. The state of the key is considered ON only when the key is held down. The PENDANT( ) function is used to detect key presses.
The KEYMODE instruction is used to set the key behavior. Detecting Pendant Key Presses Individual pendant key presses are detected with the PENDANT( ) real-valued function. (The following figure provides a reference for the numbers of the keys on the T20 pendant.) This function returns the number of the first acceptable key press. The interpretation of a key press is determined by previous execution of the KEYMODE instruction. See the eV+ Language Reference Guide for complete details. The basic use of these two operations is described below. T20 Pendant Key Map eV+Language User's Guide, v2.x, 18318-000 Rev A Page 181