Section 3: Instrument description
display.getlastkey()
The display.getlastkey() function immediately returns the key code for the last pressed key.
The following programming example illustrates how to display the last key pressed:
key = display.getlastkey()
print(key)
The above code will return the key code value (see the following table). Remember that a value of 0
(display.KEY_NONE) indicates that the key code history had been cleared.
Key codes
Value
Key list
0
display.KEY_NONE
65
display.KEY_RANGEUP
67
display.KEY_RELB
68
display.KEY_MENU
69
display.KEY_MODEA
70
display.KEY_RELA
71
display.KEY_RUN
72
display.KEY_DISPLAY
73
display.KEY_AUTO
75
display.KEY_EXIT
77
display.KEY_FILTERA
78
display.KEY_STORE
79
display.KEY_SRCA
80
display.KEY_CONFIG
81
display.KEY_RANGEDOWN
82
display.KEY_ENTER
The OUTPUT ON/OFF control for a source-measure unit (SMU) cannot be tracked by this function.
display.waitkey()
The display.waitkey() function captures the key code value for the next key press:
key = display.waitkey()
After sending the display.waitkey() function, the script pauses and waits for the operator to
press a front-panel key. For example, if the MENU key is pressed, the function returns the value 68,
which is the key code for that key. The key code values are the same as listed in
(on page 11-68).
3-34
Series 2600B System SourceMeter® Instrument Reference Manual
Value
83
84
85
86
87
90
91
92
93
94
95
97
103
104
107
114
Key list
display.KEY_MEASB
display.KEY_DIGITSB
display.KEY_RECALL
display.KEY_MEASA
display.KEY_DIGITSA
display.KEY_LIMITB
display.KEY_SPEEDB
display.KEY_TRIG
display.KEY_LIMITA
display.KEY_SPEEDA
display.KEY_LOAD
display.WHEEL_ENTER
display.KEY_RIGHT
display.KEY_LEFT
display.WHEEL_LEFT
display.WHEEL_RIGHT
display.getlastkey()
2600BS-901-01 Rev. E / January 2019
Need help?
Do you have a question about the KEITHLEY System SourceMeter 2636B and is the answer not in the manual?