Series 2600 System SourceMeters Reference Manual Display Operations 14-17
Return to Section 14 topics 2600S-901-01 Rev. A / May 2006
Capturing key-press codes
A history of the keycode for the last pressed front panel key is maintained by the
Series 2600. When the instrument is powered-on, (or when transitioning from
local to remote), the keycode is set to
0 (display.KEY_NONE).
When a front panel key is pressed, the keycode 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 keycode for
the last pressed key:
key = display.getlastkey()
print(key)
The above code will return the keycode value (see Table14-4). Keep in mind that
a value of 0 (display.KEY_NONE) indicates that the keycode history had been
cleared.
Table14-4
Keycode values returned for display.getlastkey
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)
74 (display.KEY_FILTERB)
75 (display.KEY_EXIT)
76 (display.KEY_SRCB)
77 (display.KEY_FILTERA)
78 (display.KEY_STORE)
79 (display.KEY_SRCA)
80 (display.KEY_CONFIG)
81 (display.KEY_RANGEDOWN)
82 (display.KEY_ENTER)
83 (display.KEY_MEASB)
84 (display.KEY_DIGITSB)
85 (display.KEY_RECALL)
86 (display.KEY_MEASA)
87 (display.KEY_DIGITSA)
90 (display.KEY_LIMITB)
91 (display.KEY_SPEEDB)
92 (display.KEY_TRIG)
93 (display.KEY_LIMITA)
94 (display.KEY_SPEEDA)
95 (display.KEY_LOAD)
97 (display.WHEEL_ENTER)
103 (display.KEY_RIGHT)
104 (display.KEY_LEFT)
114 (display.WHEEL_RIGHT)
NOTE The OUTPUT ON/OFF keys for SMU A and SMU B cannot be tracked
by this function.