Section 7: TSP command reference
Models 707B and 708B Switching Matrix Reference Manual
7-66
707B-901-01 Rev. B / January 2015
display.getlastkey()
This function retrieves the key code for the last pressed key.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function
Yes
Usage
keyCode
= display.getlastkey()
keyCode
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
0
display.KEY_NONE
83
display.KEY_RUN
66
display.KEY_DELETE
84
display.KEY_TRIG
67
display.KEY_EXIT
86
display.KEY_STEP
69
display.KEY_CLOSE
87
display.KEY_CHAN
70
display.KEY_SLOT
90
display.KEY_INSERT
72
display.KEY_DISPLAY
91
display.KEY_MENU
74
display.KEY_ENTER
93
display.KEY_OPEN
76
display.KEY_LOAD
94
display.KEY_PATT
77
display.KEY_SCAN
97
display.WHEEL_ENTER
79
display.KEY_OPENALL
107
display.WHEEL_LEFT
80
display.KEY_CONFIG
114
display.WHEEL_RIGHT
When using this function, use built-in constants, such as
display.KEY_STEP
, rather than the
numeric value, such as
86
. This allows for better forward compatibility with firmware revisions.