Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 29 of 37

PPT 4300 Series Product Reference Guide: Appendix B Key Mapping for Terminal Emulators, pages 241 to 248

Pages 241 to 248 of 326, from PPT 4300 Series Product Reference Guide

The original document is the PDF (3.8 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Symbol PPT-4340

Page 241

Key Mapping for Terminal Emulators

//================================================== // EXAMPLE for VT220: // new key mapping for VT220 called ‘CKT vt220’ // ================================================== newKeyMap(VT220,“CKT vt220”); fcn_vt220_home = “\x1b[H”; // add a new vt220 function key_alt_home = fcn_vt220_home; // map it to ALT-<HOME> key_alt_b = fcn_vt220_f6; // maps F6 function to Alt-B // ================================================== // EXAMPLE for 3270: // new key mapping for 3270 called “CKT 3270" // ================================================== newKeyMap(3270, “CKT 3270"); key_sysreq = fcn_3270_sysreq; // map <SYSREQ> to SysReq function key_ctrl_backspace = fcn_3270_none; // unmap CTRL-<BACKSPACE> key //================================================== // EXAMPLE for 5250: // new key mapping for 5250 called “CKT 5250" // ================================================== newKeyMap(5250,“CKT 5250"); key_alt_r = fcn_5250_error_reset; // map Error Reset to ALT-r

Figure B-1. Custom Key Mapping in keymap.cfg 4. Save keymap.cfg and reboot the terminal. After the terminal boots, and you have started a Terminal Emulator session, press <Shift-Alt-O> to display the Terminal Emulation Options screen. The new custom key map should be available and selectable.

B-9

Page 242

PPT 4300 Series Product Reference Guide

Keys Available for Re-Mapping The keys listed in Table B-4 are available for re-mapping. Keys that are not listed are not available for re-mapping. The first column lists the keys that the user would press and the second column represent the key's corresponding label used in the keymap.cfg file. Limitations: Some key combinations are not available. You cannot re-map: !

any <Shift-Alt> key combinations (e.g., <Shift-Alt-X>)

!

<Fn-F2> to <Fn-F12>

Also, there are fours pairs of keys that the system BIOS regards as identical. If you re-map one of these keys, you also re-map the matching key. They are: !

KEY_CTRL_M equals KEY_ENTER

!

KEY_CTRL_I equals KEY_TAB

!

KEY_CTRL_J equals KEY_CTRL_ENTER

!

KEY_CTRL_H equals KEY_BACKSPACE

Note that if you map a function to the <Ctrl> key in 3270 or 5250, you cannot map any other <Ctrl> key combination for that key map (e.g., <Ctrl-A>). Doing so causes an error that prevents the terminal emulator from starting. Table B-4. Keys Available for Re-mapping Key

B-10

Label

<Del>

KEY_DELETE

<End>

KEY_END

<Home>

KEY_HOME

<Ins>

KEY_INSERT

<PgUp>

KEY_PGUP

<PgDn>

KEY_PGDN

<CTRL-Del>

KEY_CTRL_DELETE

<CTRL-End>

KEY_CTRL_END

<CTRL-Home>

KEY_CTRL_HOME

<CTRL-Ins>

KEY_CTRL_INSERT

<CTRL-PgUp>

KEY_CTRL_PGUP

Page 243

Key Mapping for Terminal Emulators

Table B-4. Keys Available for Re-mapping (Continued) Key

Label

<CTRL-PgDn>

KEY_CTRL_PGDN

<ALT-Del>

KEY_ALT_DEL

<ALT-End>

KEY_ALT_END

<ALT-Home>

KEY_ALT_HOME

<ALT-Ins>

KEY_ALT_INSERT

<ALT-PgUp>

KEY_ALT_PGUP

<ALT-PgDn>

KEY_ALT_PGDN

<F1> to <F12>

KEY_F1 to KEY_F12

<CTRL-F1> to <CTRL-F12>

KEY_CTRL_F1 to KEY_CTRL_F12

<SHIFT-F1> to <SHIFT-F12>

KEY_SHIFT_F1 to KEY_SHIFT_F12

<ALT-F1> to <ALT-F12>

KEY_ALT_F1 to KEY_ALT_F12

<SHIFT-CTRL-F1> to <SHIFT-CTRL-F12>

KEY_SHIFT_CTRL_F1 to KEY_SHIFT_CTRL_F12

<CTRL-A> to <CTRL-Z>

KEY_CTRL_A to KEY_CTRL_Z

<ALT-A> to <ALT-Z>

KEY_ALT_A to KEY_ALT_Z

<ALT-0> to <ALT-9>

KEY_ALT_0 to KEY_ALT_9

<ALT-->

KEY_ALT_MINUS

<ALT-=>

KEY_ALT_EQUAL

<ALT-;>

KEY_ALT_SEMICOLON

<ALT-,>

KEY_ALT_COMMA

<ALT-.>

KEY_ALT_PERIOD

<ALT-/>

KEY_ALT_SLASH

<ALT-\>

KEY_ALT_BACKSLASH

<CTRL-->

KEY_CTRL_MINUS

<CTRL-\>

KEY_CTRL_BACKSLASH

<Tab> (or <Ctrl-I>)

KEY_TAB (or KEY_CTRL_I)

<Back Tab>

KEY_BACKTAB

B-11

Page 244

PPT 4300 Series Product Reference Guide

Table B-4. Keys Available for Re-mapping (Continued) Key

Label

<Back Space> (or <CTRL-H>)

KEY_BACKSPACE (or KEY_CTRL_H)

>CTRL-Backspace>

KEY_CTRL_BACKSPACE

>ALT-Backspace>

KEY_ALT_BACKSPACE

<Up Arrow>

KEY_UP

<CTRL-Up Arrow>

KEY_CTRL_UP

<CTRL>

KEY_CTRL (3270 and 5250 only)

<ALT-Up Arrow>

KEY_ALT_UP

<Down Arrow>

KEY_DOWN

<CTRL-Down Arrow>

KEY_CTRL_DOWN

<ALT-Down Arrow>

KEY_ALT_DOWN

<Left Arrow>

KEY_LEFT

<CTRL-Left Arrow>

KEY_CTRL_LEFT

<ALT-Left Arrow>

KEY_ALT_LEFT

<Right Arrow>

KEY_RIGHT

<CTRL-Right Arrow>

KEY_CTRL_RIGHT

<ALT-Right Arrow>

KEY_ALT_RIGHT

<ENTER> (or <CTRL-M>)

KEY_ENTER (or KEY_CTRL_M)

<CTRL-ENTER> (or <CTRL-J>) KEY_CTRL_ENTER (or KEY_CTRl_J)

B-12

<ALT-ENTER>

KEY_ALT_ENTER

<SYSRQ>

KEY_SYSREQ

<BREAK>

KEY_BREAK

<ESCAPE>

KEY_ESCAPE

Page 245

Key Mapping for Terminal Emulators

Key Function Labels for Custom Key Mapping Tables B-5, B-6 and B-7 show default key map function and key labels for TN3270, TN5250 and VT220 emulations. These are the basis of the default key maps available from the Terminal Emulation Options screen <Shift-Alt-O>. The first column of each table lists emulator-specific functions. The second column specifies the keys to press to execute those functions. Use the emulator-specific functions and key labels in the keymap.cfg file that you edit to make key mapping changes. Note: Any key not given a new function in keymap.cfg will perform its default function. This means you are not required to re-map every key. Only re-map the keys that you wish to change from the default. When you assign a function to a new key, the existing key remains active. For example, for a 3270 emulation, the default for the Clear function is the <PgDn> key. You can map <Alt-C> to perform the Clear function, however <PgDn> will also still function as Clear unless you re-map it. To unmap a default key map assignment, use FCN_x_NONE (where x is 3270, 5250 or VT220). For example, in the 3270 emulation, if you want KEY_ALT_C to perform the FCN_3270_CLEAR function and the KEY_PGDN key (which performs the FCN_3270_CLEAR function by default) to do nothing, keymap.cfg would list: KEY_ALT_C = FCN_3270_CLEAR; KEY_PGDN = FCN_3270_NONE;

Creating new VT220 functions Table B-7 describes all the standard VT220 functions, every possible standard key string that can be transmitted from a VT220 terminal. However, you may occasionally want a terminal key to send a non-standard escape string. For example, you may want the <Home> key to send out a key string of: \x1b[H. You can create new VT220 function labels in the keymap.cfg file and assign strings to them so that when those functions are invoked in the terminal, corresponding strings are sent to the host. Space reserved for new function strings is limited to 256 bytes. At an estimated 5 bytes per new function string, you can add approximately 50 new functions to the existing VT220 function list.

B-13

Page 246

PPT 4300 Series Product Reference Guide

In keymap.cfg, place new function entries immediately after the header line of a section, before the first KEY_ entries for the section. The first token in the line is the function name which must start with FCN_VT220_. The second token, separated by an equal sign from the function name, is a character sequence (in double quotes) to send to the host when the new function is invoked. For characters with no symbolic representation, use \xnn where the nn is the two digit hexadecimal value of the character (e.g., <Tab> is \x09; <ESCAPE> is \x1b). If you want to represent the characters “\x” in a string, use \x5cx. For a double quote in the string, use \x22. For example, consider the new <Home> function mentioned above and a hypothetical “hello world” function. The keymap.cfg entries for a key map called “My VT220” would look like: newKeyMap(VT220, “My VT220”); FCN_VT220_HOME =“\x1b[H”; FCN_VT220_HELLO =“hello world”; ... KEY_HOME =FCN_VT220_HOME; KEY_ALT_G =FCN_VT220_HELLO;

The second new function FCN_VT220_HELLO, when invoked, will send a “hello world” string to the host. Then later in the section, the <Home> and <Alt-G> keys are mapped to these functions in the same manner as the standard, provided functions. Now, if you use the “My VT220” custom key map, <Home> and <Alt-G> transmit “\x1b[H” and “hello world” to the host, respectively.

B-14

Page 247

Key Mapping for Terminal Emulators

VT220 Values for Key Mapping Table B-5. VT220 Values for Key Mapping Function Label

Key Stringa

Default Key Label

FCN_VT220_BACKSPACE

\x08

KEY_BACKSPACE

FCN_VT220_CLOSE_SESSION local

KEY_SHIFT_ALT_X

FCN_VT220_DELETE

\x7f

KEY_CTRL_BACKSPACE b

FCN_VT220_DOWN

\x1b[B or \x1bOB

KEY_DOWN

FCN_VT220_F6

\x1b[17~

KEY_F6

FCN_VT220_F7

\x1b[18~

KEY_F7

FCN_VT220_F8

\x1b[19~

KEY_F8

FCN_VT220_F9

\x1b[20~

KEY_F9

FCN_VT220_F10

\x1b[21~

KEY_F10

FCN_VT220_F11

\x1b[23~

KEY_CTRL_F1 or KEY_F11

FCN_VT220_F12

\x1b[24~

KEY_CTRL_F2 or KEY_F12

FCN_VT220_F13

\x1b[25~

KEY_CTRL_F3

FCN_VT220_F14

\x1b[26~

KEY_CTRL_F4

FCN_VT220_HELP

\x1b[28~

KEY_CTRL_F5 or KEY_F5

FCN_VT220_DO

\x1b[29~

KEY_CTRL_F6

FCN_VT220_F17

\x1b[31~

KEY_CTRL_F7

FCN_VT220_F18

\x1b[32~

KEY_CTRL_F8

FCN_VT220_F19

\x1b[33~

KEY_CTRL_F9

FCN_VT220_F20

\x1b[34~

KEY_CTRL_F10

FCN_VT220_FIND

\x1b[1~

KEY_INSERT

FCN_VT220_INSERT_HERE

\x1b[2~

KEY_HOME

FCN_VT220_APPL_KP0

\x1bOp

KEY_ALT_0

FCN_VT220_APPL_KP1

\x1bOq

KEY_ALT_1

FCN_VT220_APPL_KP2

\x1bOr

KEY_ALT_2

FCN_VT220_APPL_KP3

\x1bOs

KEY_ALT_3

B-15

Page 248

PPT 4300 Series Product Reference Guide

Table B-5. VT220 Values for Key Mapping Function Label

Key Stringa

Default Key Label

FCN_VT220_APPL_KP4

\x1bOt

KEY_ALT_4

FCN_VT220_APPL_KP5

\x1bOu

KEY_ALT_5

FCN_VT220_APPL_KP6

\x1bOv

KEY_ALT_6

FCN_VT220_APPL_KP7

\x1bOw

KEY_ALT_7

FCN_VT220_APPL_KP8

\x1bOx

KEY_ALT_8

FCN_VT220_APPL_KP9

\x1bOy

KEY_ALT_9

FCN_VT220_APPL_KP_MINUS

\x1bOm

KEY_ALT_MINUS

FCN_VT220_APPL_KP_COMMA

\x1bO

KEY_ALT_COMMA

FCN_VT220_APPL_KP_PERIOD

\x1bOn

KEY_ALT_PERIOD

FCN_VT220_APPL_KP_ENTER

\x1bOM

KEY_ALT_ENTER

FCN_VT220_NEWLINE

\x0a

KEY_CTRL_ENTER

FCN_VT220_NEXT_SCREEN

\x1b[6~

KEY_PGDN

FCN_VT220_PF1

\x1bOP

KEY_F1

FCN_VT220_PF2

\x1bOQ

KEY_F2

FCN_VT220_PF3

\x1bOR

KEY_F3

FCN_VT220_PF4

\x1bOS

KEY_F4

FCN_VT220_PREV_SCREEN

\x1b[5~

KEY_END

FCN_VT220_REMOVE

\x1b[3~

KEY_PGUP c

FCN_VT220_RETURN

\x0d or \x0d\xoa

FCN_VT220_RIGHT

\x1b[C or \x1bOCb

KEY_RIGHT

FCN_VT220_LEFT

\x1b[D or \x1bODb

KEY_LEFT

FCN_VT220_SELECT

\x1b[4~

KEY_DELETE d

KEY_ENTER

FCN_VT220_132_SHIFT_LEFT_10 local

FCN_VT220_132_SHIFT_LEFT_EDGE local

KEY_SHIFT_CTRL_LEFT

FCN_VT220_132_SHIFT_RIGHT_10 local

KEY_CTRL_RIGHT

B-16

KEY_CTRL_LEFT