2600AS-901-01 Rev. B / September 2008 Return to Section Topics 19-53
Series 2600A System SourceMeter® Instruments Reference Manual Section 19: Remote Commands
display.waitkey
Function Captures the key code value for the next key press.
TSP-Link
accessibility
This function can be accessed from a remote TSP-Link node.
Usage key = display.waitkey()
key The key code.
Remarks • After sending this function, script execution will hold up until a front panel key or the wheel is
pressed, or the wheel is turned. After pressing a control or turning the wheel, the key code value
for that key will be returned. The chart shown below lists the key code value for each front panel
control. The controls are listed alphabetically.
• If the EXIT key is pressed while this function is waiting for a keystroke, the script will not be
aborted.
• A typical use for this function is to prompt the user to press EXIT to abort the script or press any
other key to continue. If key code value 75 is returned (EXIT key pressed), then the exit()
function can be called to abort the script. Sample code for this process is provided in Capturing
key-press codes in Section 11.
• The above chart lists the numeric key code values for the front panel controls. The key code
value identifiers are listed in the documentation for display.sendkey
(for example, display.KEY_RUN is the identifier for the RUN key).
Details See Capturing key-press codes in Section 11.
Also see display.sendkey, display.settext, display.getlastkey
Example The following code will hold up script execution and wait for the operator to press a key or the
wheel, or rotate the wheel:
key = display.waitkey()
print(key)
Output: 8.600000e+01
The above output (86) indicates that the MEAS (A) key was pressed.
Control Key code Control Key code Control Key code
AUTO 73 LIMIT (B) 90 REL (A) 70
CONFIG 80 LOAD 95 REL (B) 67
CURSOR
(left)
401 MEAS (A) 86 RUN 71
CURSOR
(right)
103 MEAS (B) 83 SPEED (A) 94
DIGITS (A) 87 MENU 68 SPEED (B) 91
DIGITS (B) 84 MODE (A) 69 SRC (A) 79
DISPLAY 72 MODE (B) 66 SRC (B) 76
ENTER 82 OUTPUT (A) 88 STORE 78
EXIT 75 OUTPUT (B) 96 TRIG 92
FILTER (A) 77
RANGE
(down)
84
WHEEL
(press)
97
FILTER (B) 74 RANGE (up) 65
WHEEL
(left)
107
LIMIT (A) 93 RECALL 85
WHEEL
(right)
114