Section 9: Introduction to TSP operation Series 3700A System Switch/Multimeter Reference Manual
9-20 3700AS-901-01 Rev. D/June 2018
display.getlastkey()
The display.getlastkey() function immediately returns the key code for the last pressed key.
The following programming example illustrates how to display the last key pressed:
key = display.getlastkey()
print(key)
The above code will return the key code value (see the following table). Remember that a value of 0
(display.KEY_NONE) indicates that the key code history had been cleared.
Key code values returned for display.getlastkey
display.waitkey()
The display.waitkey() function captures the key code value for the next key press:
key = display.waitkey()
After sending the display.waitkey() function, the script pauses and waits for the operator to
press a front-panel key. For example, if the MENU key is pressed, the function returns the value 68,
which is the key code for that key. The key code values are the same as listed in display.getlastkey()
(on page 11-129).