8-4 Programmer’s Guide
Front Panel Keycodes
Front Panel Keycodes
Key Queue
The SYSTem:KEY[:VALue]? query removes the key from the key queue,
so that you can read the next key. For this reason, you must perform the
SYSTem:KEY:TYPE? query before performing the
SYSTem:KEY[:VALue]?.
The Key Queue stores up to 32 key press events. After 32 key presses,
the queue is full, and no more key press events can be stored without
reading from the queue (using SYSTem:KEY[:VALue]?). Subsequent
key presses or knob ticks will be ignored when the queue is full.
You can query the queue length using this command:
SYSTem:KEY:QUEue:MAXimum?
You can clear the queue using this command:
SYSTem:KEY:QUEue:CLEar
You can check how many key presses or knob tick events have occurred
using this command:
SYSTem:KEY:QUEUE:COUNt?
You can turn the key queue on or off using this command:
SYSTem:KEY:QUEUE[:STATe] <ON|OFF>
When the queue is turned off, your program must read each key before a
following key is pressed, or information will be lost. It is generally best to
leave the queue enabled.
Example Program
For a complete example of how to read the front panel keys and knob,
refer to the KEYCODE example program in the Example Programs
Guide.