Key mapping in the 3270 Emulator


Topaz 3270 Emulator provides a default keymap file that contains the following entries:

Key

Action

<Key>PRIOR

PF(7)

<Key>NEXT

PF(8)

<Key>Pause

Attn

Shift<Key>Return

Newline

Shift<Key>Escape

Clear

Shift<Key>Tab

BackTab

Ctrl<Key>Left

PreviousWord

Ctrl<Key>Right

NextWord

Keymaps

Each line in the keymap has the following format:

[modifier...] <Key> keyname... : action[(args)]...

where:

modifier is a keyboard modifier, such as Ctrl or Alt

keyname is a key name, which is a symbolic name for a key, such as semicolon (;) or a Windows key name like HOME (the Home key)

action is a 3270 action, such as Enter or PF

args are the optional action arguments, such as a number to specify which PF key to transmit.

Note that order matters in the keymap. Three important rules apply:

  • User-specified keymaps appear after the default keymap.
  • More-specific entries must come before less-specific ones.
  • If there is more than one entry mapping exactly the same key (with the modifiers), the last one wins.

As an example of the second rule, when mapping both BACK (the Backspace key) and Shift-BACK, the entry for Shift-BACK must come before the entry for BACK, otherwise the entry for Shift-BACK will be ignored.

The first rule, combined with the second, means that a default key mapping may interfere with a custom keymap. For example, when defining a mapping for Ctrl-Shift-F1, the default mapping for Shift-F1 (PF13) will override it. The way around this is to use the third rule: define a custom mapping for Shift-F1. This entry will disable the one in the default keymap. However, (because of the second rule) be sure to put it after the entry for Ctrl-Shift-F1.

Modifiers

The optional Shift, Alt or Ctrl modifiers specify that the Shift, Alt or Ctrl key is pressed along with the specified key, respectively. The LeftCtrl, RightCtrl, LeftAlt, and RightAlt modifiers specify a particular Ctrl or Alt key. The Enhanced modifier is also available; Enhanced <Key>ENTER is the keypad Enter key.

Actions

Actions marked with an asterisk (*) may block, sending data to the host and possibly waiting for a response.

*Attn

Attention key

BackSpace

Move cursor left (or send ASCII BS)

BackTab

Tab to start of previous input field

CircumNot

Input "^" in NVT mode, or "¬" in 3270 mode

*Clear

Clear screen

*Connect(host)

Connect to host

Copy

Copy highlighted area to clipboard

*CursorSelect

Cursor Select AID

Cut

Copy highlighted area to clipboard and erase

Delete

Delete character under cursor (or send ASCII DEL)

DeleteField

Delete the entire field

DeleteWord

Delete the current or previous word

*Disconnect

Disconnect from host

Down

Move cursor down

Dup

Duplicate field

*Enter

Enter AID (or send ASCII CR)

Erase

Erase previous character (or send ASCII BS)

EraseEOF

Erase to end of current field

EraseInput

Erase all input fields

FieldEnd

Move cursor to end of field

FieldMark

Mark field

HexString(hex_digits)

Insert control-character string

Home

Move cursor to first input field

Insert

Set insert mode

*Interrupt

Send TELNET IP to host

Key(keysym)

Insert key keysym

Key(0xxx)

Insert key with character code xx

Left

Move cursor left

Left2

Move cursor left 2 positions

Menu

Display menu bar

MonoCase

Toggle uppercase-only mode

MoveCursor(row, col)

Move cursor to zero-origin (row,col)

Newline

Move cursor to first field on next line (or send ASCII LF)

NextWord

Move cursor to next word

*PA(n)

Program Attention AID (n from 1 to 3)

*PF(n)

Program Function AID (n from 1 to 24)

PreviousWord

Move cursor to previous word

Paste

Insert clipboard contents

Quit

Exit wc3270

Reset

Reset locked keyboard

Right

Move cursor right

Right2

Move cursor right 2 positions

*String(string)

Insert string (simple macro facility)

SysReq

System Request AID

Tab

Move cursor to next input field

Toggle(option[,set|clear])

Toggle an option

ToggleInsert

Toggle insert mode

ToggleReverse

Toggle reverse-input mode

Up

Move cursor up

Command names are case-insensitive and parameters can be specified with parentheses and commas, as in the following examples:

  • PF(1)
  • With spaces (such as PF 1)
  • Parameters can be quoted with double-quote characters, to allow spaces, commas, and parentheses to be used.

Key names

The names for alphanumeric keys can be entered literally, for example, a for the A key. They can also be entered using ISO 8859-1 standard names, such as colon for the “:” key (which would otherwise confuse the keymap syntax). Symbolic Windows key names can also be used, and finally, Unicode values (U+nnnn). Refer to http://www.fileformat.info/info/charset/ISO-8859-1/list.htm and https://cs.stanford.edu/people/miles/iso8859.html.

Keymap entries are case-sensitive and modifier-specific. This means that a keymap for the b key will match only a lowercase b. Actions for uppercase B, or for Alt-B, must be specified separately.

Available symbolic key names are: ADD, ALT, APPS, BACK (BackSpace), BackSpace (alias for BACK), CLEAR, CTRL, DECIMAL, DELETE, DIVIDE, DOWN, END, Enter (alias for RETURN), ESCAPE, Esc (alias for ESCAPE), EXECUTE, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24,HELP, HOME, INSERT, LEFT, LMENU, LWIN (left Windows key), MULTIPLY, NEXT (Page Down), NUMLOCK, NUMPAD0, NUMPAD1, NUMPAD2, NUMPAD3, NUMPAD4,NUMPAD5, NUMPAD6, NUMPAD7, NUMPAD8, NUMPAD9, PageUp (alias for PRIOR), PageDown (alias for Next), PAUSE, PRINT, PRIOR (Page Up), RETURN (Enter),RIGHT, RMENU, RWIN (right Windows key), SCROLL, SELECT, SEPARATOR, SHIFT, SLEEP, SNAPSHOT, SUBTRACT, TAB and UP. In addition, any Windows VKey code can be specified in hexadecimal with the syntax VKEY-0xnn.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*