System SourceMeter® Instrument Reference Manual Section 7:
2600BS-901-01 Rev. B / May 2013 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
Usage
keyCode = display.waitkey()
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)
65
84
76
96
When using this function, use built-in constants such as display.KEY_RIGHT (rather than the
numeric value of 103). This will allow for better forward compatibility with firmware revisions.