User manual
Series 3700 System Switch/Multimeter Reference Manual  Section 13: Instrument Control Library (ICL) 
3700S-901-01 Rev. C / July 2008  13-97 
display.getlastkey() 
Remarks 
This read-only function returns the key code for the last pressed key. key returns one 
of the following values: 
Key List 
Value 
Key List 
Value 
display.KEY_RIGHT 
103 
display.KEY_INSERT 
78 
display.KEY_LEFT 
104 
display.KEY_OPENALL 
79 
display.WHEEL_LEFT 
107 
display.KEY_CONFIG 
80 
display.WHEEL_RIGHT 
114 
display.KEY_RANGEDOW
N 
81 
display.KEY_RANGEUP 
65 
display.KEY_ENTER 
82 
display.KEY_FUNC 
66 
display.KEY_REC 
83 
display.KEY_REL 
67 
display.KEY_DMM 
84 
display.KEY_MENU 
68 
display.KEY_DELETE 
85 
display.KEY_CLOSE 
69 
display.KEY_STEP 
86 
display.KEY_SLOT 
70 
display.KEY_CHAN 
87 
display.KEY_RUN 
71 
display.KEY_RATE 
90 
display.KEY_DISPLAY 
72 
display.KEY_LIMIT 
91 
display.KEY_AUTO 
73 
display.KEY_TRIG 
92 
display.KEY_FILTER 
74 
display.KEY_OPEN 
93 
display.KEY_EXIT 
75 
display.KEY_PATT 
94 
display.KEY_STORE 
76 
display.KEY_LOAD 
95 
display.KEY_SCAN 
77 
display.WHEEL_ENTER 
97 
A history of the key code for the last pressed front panel key is maintained by the 
Series 3700. When the instrument is powered-on, (or when transitioning from local to 
remote), the key code is set to 0 (display.KEY_NONE). 
Pressing the EXIT/LOCAL key normally aborts a script. In order to use this function 
with the EXIT key, display.locallockout (on page 13-102) must be used. 
Also see 
display.sendkey() (on page 13-105) 
display.locallockout (on page 13-102) 
Example 
On the front panel, press the MENU key and then send the following code: 
key = display.getlastkey()  
print(key)  
Output: 6.800000e+01  










