2600AS-901-01 Rev. B / September 2008
Return to
11-13
Series 2600A System SourceMeter® Instruments Reference Manual
Section 11: Display Operations
Capturing key-press codes
A history of the key code for the last pressed front panel key is maintained by the Series 2600A.
When the instrument is powered-on (or when transitioning from local to remote), the key code is
set to
0
(
display.KEY_NONE)
.
When a front panel key is pressed, the key code value for that key can be captured and returned.
There are two functions associated with the capture of key-press codes:
display.getlastkey
and
display.waitkey
.
display.getlastkey
The
display.getlastkey
function is used to immediately return the key code for the last pressed
key:
key = display.getlastkey()
print(key)
The above code will return the key code value (see
). Keep in mind that a value of
0
(
display.KEY_NONE
) indicates that the key code history had been cleared.
Table 11-3
Key codes to send for display.sendkey
display.KEY_AUTO
or
73
display.KEY_CONFIG
or
80
display.KEY_DIGITSA
or
87
display.KEY_DIGITSB
or
84
display.KEY_DISPLAY
or
72
display.KEY_ENTER
or
82
display.KEY_EXIT
or
75
display.KEY_FILTERA
or
77
display.KEY_FILTERB
or
74
display.KEY_LEFT
or
104
display.KEY_LIMITA
or
93
display.KEY_LIMITB
or
90
display.KEY_LOAD
or
95
display.KEY_MEASA
or
86
display.KEY_MEASB
or
83
display.KEY_MENU
or
68
display.KEY_MODEA
or
69
display.KEY_MODEB
or
66
display.KEY_OUTPUTA
or
88
display.KEY_OUTPUTB
or
96
display.KEY_RANGEDOWN
or
81
display.KEY_RANGEUP
or
65
display.KEY_RECALL
or
85
display.KEY_RELA
or
70
display.KEY_RELB
or
67
display.KEY_RIGHT
or
103
display.KEY_RUN
or
71
display.KEY_SPEEDA
or
94
display.KEY_SPEEDB
or
91
display.KEY_SRCA
or
79
display.KEY_SRCB
or
76
display.KEY_STORE
or
78
display.KEY_TRIG
or
92
display.WHEEL_ENTER
or
97
display.WHEEL_LEFT
or
107
display.WHEEL_RIGHT
or
114