EM3270 Manual
Alternate Function-Key Mapping
E-10 110332âTandem EM3270 Manual
Color-Mapping and Function-Key Mapping
Declarations for the function-key mapping procedure for a Tandem terminal emulator 
(for example, PCT.EXE) are shown in Figure E-6. 
Note. The EM3270 emulator uses the READ TERMINAL STATUS COMMAND (ESC ^) to 
determine which user mapping procedure to use. If the device returns a terminal ID of âFâ, the 
user^function^key^mapping^tnt procedure is used. Otherwise, the user^function^key^mapping 
procedure is used.
Figure E-6. Procedure for PCT Terminal Function-Key Mapping
PROC user^function^key^mapping^tnt (key^value, key^index);
 INT key^value, ! Contains the PCT function-key
 ! value upon entry.
 .key^index; ! Contains the EM3270 emulator-key index
 ! on the return.
BEGIN
LITERAL f1 = %100,
 f^return = %126,
 sf1 = %140,
 sf^return = %166;
INT f^to^aid [0:45] = 'p' :=
 [ 5, 6, 7, 8, 9, 10, 11, 12, ! F1 - F8
 13, 14, 15, 16, 1, 2, 3, 0, ! F9 - F16
 -7, -6, -5, -4, -13, -1, 0, ! ROLL UP - RETURN
 17, 18, 19, 20, 21, 22, 23, 24, ! SF1 - SF8
 25, 26, 27, 28, -9, 4, -2, -3, ! SF9 - SF16
 -8,-10,-12,-11, -1, -1, 0 ]; ! SROLL UP
 ! - SRETURN
IF key^value >= f1 AND key^value <= f^return THEN
 key^index := f^to^aid[key^value - %100]
ELSE IF key^value >= sf1 AND key^value <= sf^return THEN
 key^index := f^to^aid[key^value - %111]
ELSE key^index := -1; !Invalid key^value
END;










