Models 707B and 708B Switching Matrix Reference Manual
Section 7: TSP command reference
707B-901-01 Rev. B / January 2015
7-81
display.waitkey()
This function captures the key code value for the next front-panel action.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function
Yes
Usage
keyCode
= display.waitkey()
keyCode
See
Details
for more information
Details
After you send this function, script execution pauses until a front-panel action (for example, pressing
a key or the navigation wheel , or turning the navigation wheel ). After the action, the value of the
key (or action) is returned.
If the EXIT (LOCAL) key is pressed while this function is waiting for a front-panel action, the script is
not aborted.
A typical use for this function is to prompt the user to press the EXIT (LOCAL) key to abort the script
or press any other key to continue. For example, if the
keyCode
value
75
is returned (the EXIT
(LOCAL) key was pressed), the
exit()
function can be called to abort the script.
The table below lists the
keyCode
value for each front panel action.
Key codes
Value
Key (or action)
Value
Key (or action)
0
display.KEY_NONE
82
display.KEY_ENTER
65
display.KEY_RANGEUP
85
display.KEY_RECALL
68
display.KEY_MENU
86
display.KEY_MEASA
69
display.KEY_MODEA
86
display.KEY_DIGITSA
70
display.KEY_RELA
88
display.KEY_OUTPUTA
71
display.KEY_RUN
92
display.KEY_TRIG
72
display.KEY_DISPLAY
93
display.KEY_LIMITA
73
display.KEY_AUTO
94
display.KEY_SPEEDA
75
display.KEY_EXIT
95
display.KEY_LOAD
77
display.KEY_FILTERA
97
display.WHEEL_ENTER
78
display.KEY_STORE
103
display.KEY_RIGHT
79
display.KEY_SRCA
104
display.KEY_LEFT
80
display.KEY_CONFIG
107
display.WHEEL_LEFT
81
display.KEY_RANGEDOWN
114
display.WHEEL_RIGHT
When using this function, use built-in constants, such as
display.KEY_RIGHT
, rather than the
numeric value, such as
103
. This allows for better forward compatibility with firmware revisions.