The SETUP_KEYS procedure sets function keys for use with UNIX versions of IDL when used with the standard tty command interface.
Under UNIX, the number of function keys, their names, and the escape sequences they send to the host computer vary enough between various keyboards that IDL cannot be written to understand all keyboards. Therefore, IDL provides a very general routine named DEFINE_KEY that allows the user to specify the names and escape sequences of function keys.
SETUP_KEYS provides a convenient interface to DEFINE_KEY, using user input (via the keywords described below), the TERM environment variable and the type of machine the current IDL is running on to determine what kind of keyboard you are using, and then uses DEFINE_KEY to enter the proper definitions for the function keys.
The new mappings for the keys can be viewed using the command
The need for SETUP_KEYS has diminished in recent years because most UNIX terminal emulators have adopted the ANSI standard for function keys, as represented by VT100 terminals and their many derivatives, as well as xterm and the newer CDE based dtterm.
The current version of IDL already knows the function keys of such terminals, so SETUP_KEYS is not required. However, SETUP_KEYS is still needed to define keys on non-ANSI terminals such as the Sun shelltool, SGI Iris-ansi terminal emulator, or IBM's aixterm.
IDL does not support the function keys from the hpterm terminal emulator supplied on HP systems. Hpterm uses non ANSI-standard escape sequences which IDL cannot parse. RSI recommends the use of the xterm or dtterm terminal emulators instead.
This routine is written in the IDL language. Its source code can be found in the file
setup_keys.pro in the
lib subdirectory of the IDL distribution.
SETUP_KEYS [, /ANSI] [, /EIGHTBIT] [, /SUN | , /VT200 | , /HP9000 | , /IBM | , /MIPS | , /SGI] [, /APP_KEYPAD] [, /NUM_KEYPAD]
Set this keyword to establish function key definitions for ANSI keyboards.
Set this keyword to use the 8-bit versions of the escape codes (instead of the default 7-bit) when establishing VT200 function key definitions.
Set this keyword to establish function key definitions for a Sun3 keyboard.
Set this keyword to establish function key definitions for a DEC VT200 keyboard.
Set this keyword to establish function key definitions for an HP 9000 series 300 keyboard. Although the HP 9000 series 300 supports both xterm and hpterm windows, IDL supports only user-definable key definitions in xterm windows-hpterm windows use non-standard escape sequences which IDL does not attempt to handle.
Set this keyword to establish function key definitions for IBM keyboards.
Set this keyword to establish function key definitions for a Mips RS series keyboard.
Set this keyword to establish function key definitions for SGI keyboards.
Set this keyword to define escape sequences for the group of keys in the numeric keypad, enabling these keys to be programmed within IDL.
Set this keyword to disable programmability of the numeric keypad.
Introduced: Pre 4.0