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. This file is part of TCP/IP in Network Support Facilities.
The $HOME/.3270keys.hft File
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:
Item | Description |
---|---|
\b | Backspace |
\s | Space |
\t | Tab |
\n | New line |
\r | Return |
\e | Escape |
^ | 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® Version 7.1 Networks and communication management.
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
Item | Description |
---|---|
/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. |