System SourceMeter® Instrument Reference Manual Section 7:
2600BS-901-01 Rev. C / August 2016 7-69
display.getlastkey()
This function retrieves the key code for the last pressed key.
Type TSP-Link accessible
Affected by Where saved Default value
Usage
keyCode = display.getlastkey()
A returned value that represents the last front-panel key pressed; see Details for
more information
Details
A history of the key code for the last pressed front-panel key is maintained by the instrument. When
the instrument is turned on, or when it is transitioning from local to remote operation, the key code is
set to 0 (display.KEY_NONE).
Pressing the EXIT (LOCAL) key normally aborts a script. To use this function with the EXIT (LOCAL)
key, you must set display.locallockout to display.LOCK.
The table below lists the keyCode value for each front-panel action.
Key codes
Value Key list
Value Key list
65 display.KEY_RANGEUP
83 display.KEY_MEASB
69 display.KEY_MODEA
86 display.KEY_MEASA
72 display.KEY_DISPLAY
91 display.KEY_SPEEDB
73 display.KEY_AUTO
92 display.KEY_TRIG
76 display.KEY_SRCB
95 display.KEY_LOAD
79 display.KEY_SRCA
104 display.KEY_LEFT