System SourceMeter® Instrument Reference Manual Section 3:
2600BS-901-01 Rev. C / August 2016 3-81
display.getlastkey()
The display.getlastkey() function is used to immediately return 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 codes
Value Key list
Value Key list
The OUTPUT ON/OFF control for a source-measure unit (SMU) cannot be tracked by this function.
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 will pause and wait for the operator to
press a front-panel key. For example, if the MENU key is pressed, the function will return 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 7-69
).