Show/Hide Toolbars

Inventu FVTerm Web Terminal Emulation Help

Navigation: Customization

Editing the Keyboard Settings

Scroll Prev Top Next More

A special file, SCKeyDefs.js is used to define how the PC keys are mapped to the corresponding host keys.

 

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 SCKeyDefs to ensure they match your standards, and edit appropriately.

 

If you do make changes to SCKeyDefs, 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. Notpad). 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)');