Show/Hide Toolbars

Inventu Viewer+ Main Help

A special file, SCKeyDefs.js is used to define how the PC keys are mapped to the corresponding host keys.  In this file is a section for each protocol (ASCII / VT, 3270 or 5250).

 

Since different organizations have different standards for their emulator keys (particularly such keys as the 3270 CLEAR and 5250 HELP), you should review the key definitions in a live session using the web browser and the instructions below to change any keys that are different than the distributed defaults.  If your existing terminal emulator has a definition or file you can review for any customizations, that can be helpful also.

 

If you do make changes to SCKeyDefs.js, please save a copy should subsequent installations inadvertently overwrite your version.

 

Generating a Keyboard Map

 

The best way to update the SCKeydefs.js file is to first use the FVTerm Emulator's built-in remapping helper.

 

1.Start an FVTerm Emulator session and click on the Keyboard Mapper Icon:
 
keycust1
 

2.Click on a key to modify (you will do this step for all keys)
 
keycust2
 

3.Clicking on a key will scroll to the key's settings in the table.  In the example, the Right Control key was clicked, which is distributed a "Field Exit" which in the 3270 environment is an Erase End of Field and may not be what you want...
 
keycust3
 

4.In this example, we will change the Right Control to an "Enter" key:
 
keycust4
 

5.Once you have changed all the keys you want, click on the Generate button:
 
keycust5
 

6.This will open the example key mappings based on the starting (default) settings but incorporating your changes.  You can copy the text from the generated form to the SCKeyControl.js file as described below:
 
keycust6
 

7.The above example is for a TN3270 connection--in SCKeyDef.js, find the same section and replace it from the form...

 

Manual Edits to SCKeyDef.js

 

To view or modify the keyboard settings open then SCKeyDef.js file with your preferred editor (e.g. Notepad). The following 5 lines show the mapping settings for backspace, tab, shift-tab, enter and F3.

 

fk(8,'Backspace','handled=SCBackSp(em,kev)');

fk(9,'Tab','handled=SCTab(em,ev,kev)');

fk(9,'s-Tab','handled=SCBackTab(em,ev,kev)');

fk(13,'Enter','HSEND(em,"Enter")');

fk(114,'F3','HPF(em,3)');

 

 

The first parameter is the ASCII code for the key (ENTER is 13). The second parameter is the text representation of the keystroke. It is important because it is used to determine whether the key press includes the CONTROL, ALT, or SHIFT keys (e.g. s-Tab is a SHIFT-TAB). The final parameter is the function that is going to handle the key press.

 

To change the mapping for a key copy the action you want the key to perform and then change the ASCII code to the key to trap. For example, the following code swops the ENTER key and the F3 keys' functions:

 

fk(8,'Backspace','handled=SCBackSp(em,kev)');

fk(9,'Tab','handled=SCTab(em,ev,kev)');

fk(9,'s-Tab','handled=SCBackTab(em,ev,kev)');

fk(114,'Enter','HSEND(em,"Enter")');

//fk(13,'Enter','HSEND(em,"Enter")');

fk(13,'F3','HPF(em,3)');

//fk(114,'F3','HPF(em,3)');