Defines keyboard mapping and colors for the tn and telnet command.
The $HOME/.3270keys file specifies for a user a tn or telnet command key mapping that differs from the default mapping found in the /etc/3270.keys file. You can use it, for example, to make the Action key act as the Enter key.
If you are using a color display, you can also customize the colors for various 3270 display attributes by setting attributes in the .3270keys file. The default mapping in the /etc/3270.keys file is generic. The user can also load the user-defined files for specific terminal types by using the .3270keys file. The .3270keys file is specified in the user's home directory. The default background color is black. You cannot configure the background color.
The tn or telnet command first checks the $HOME directory for the .3270keys file and loads it. If the file doesn't exist, the /etc/3270.keys file is loaded. Both files, by default, end with an if statement and a list of terminal types. If the TERM environment variable matches one of the listed terminals, a second file is loaded. If the TERM variable does not match, the tn or telnet command uses the generic key bindings specified before the if statement and prints the message NOBINDINGS.
Note: When remapping keys to customize your $HOME/.3270keys file, remember that you cannot map a 3270 function to the Esc key alone. You can specify the Esc key only in combination with another key. Also, when mapping keys, do not duplicate key sequences. For example, if you have mapped the backtab function to the ^A (the Ctrl-A key sequence), then mapping the PF1 function key to ^Aep (the Ctrl-Aep key sequence) is going to conflict with the backtab mapping.
You can also use the /usr/lpp/tcpip/samples/3270keys.hft sample file to create a $HOME/.3270keys.hft file by copying the sample file to your home directory and modifying it as necessary.
The following options can be used
in the sequence field:
|^||Mask next character with \037; for example, ^M.|
|~||Set high-order bit for next character.|
The following are valid colors for 3270 display attributes:
For more information about changing the assignment of a key set, see "Changing the Assignment of a Key Set" in AIX 5L Version 5.1 System User's Guide: Communications and Networks.
Note: The 3270keys.hft file supports the Attention key, which sends an IAC BREAK TELNET protocol sequence to the TELNET server on a VM or MVS system. The TELNET server is responsible for implementing the Attention key. Example 2 shows the format for binding the Attention key to the Ctrl-F12 key sequence.
3270 Function Sequence Key bind backspace "\b" #backspace key bind tab "\t" #tab key
The # (pound sign) is used to indicate comments.
3270 Function Sequence Key bind attention "\e[036q" #attention key
This file is part of TCP/IP in Network Support Facilities in Base Operating System (BOS) Runtime.
|/etc/3270.keys||Contains the default keyboard mapping for non-HFT keyboards.|
|/etc/3270keys.hft||Contains the default keyboard mapping for HFT keyboards.|
|/usr/lpp/tcpip/samples/3270keys.hft||Contains a sample HFT keyboard mapping.|
The telnet, tn, or tn3270 command.
The map3270 file format.
Changing the Assignment of a Key Set in AIX 5L Version 5.1 System User's Guide: Communications and Networks.