Chat with us, powered by LiveChat

Flynet Viewer Terminal Emulation User Guide to key mappings

Introduction
If your host, operating system, or application requires certain actions to apply to keys, this document will take you through the process of defining such actions. These may be, for example, you would like or need the control and L key combination to clear the screen, or possibly your host needs Control-D to logoff, these actions can be configured.

Audience
End User or Operations or support, installation, or sysops staff.

Requirements
Before starting, the following components are required:

  • An existing installation of Flynet Viewer Server, configured and working.
  • Internet Explorer 7 or above or some other browser running on a computer that has access to the above.
  • Relevant security authorization:
    • For client configuration very little security is required.
    • For server-side configuration (to set default key mapping for everyone server-side) you will need access to the Flynet Server with administrator privileges.

(Most of the above environmental specifics should be provided by your system administrator before starting this guide.)

1. The active keyboard configuration may be viewed by clicking on the keyboard edit icon: on the status bar. This will not work correctly unless you are connected to a host.

This will bring up the Keyboard Mapping tool:

2. Clicking on a key on the graphical representation of the keyboard will scroll the keys list to that key’s entry.

in this case "L":

3. Actions can be modified/chosen for the native key, shift, Alt or Control. In this case (using the drop-down list) Ctrl-L (control and L) is being changed to send Clear Screen to the host:

4. and save or exit:


In this case, Clear (clear screen) has been selected for Ctrl-L and as there are changes to save the “Save Changes” button appears. “Reset Keys” will return the key actions to those defined on the server. Close Window will close the tool.

5. Your settings are stored locally; on the machine you are currently using. They do not affect the server settings and will not be available to you if you use a different browser or machine to access FVTerm. (You can configure as many key actions in a session as you need / require).

Making the Changes Server-Side
Any of the above changes will need to be made whilst on the Flynet server itself. If this is the case, you will be able to access the host with: http://localhost/FVTerm
If this is the case, the Keyboard mapper should show an additional button:

The "Generate" button will allow you to generate the replacement code based on the keyboard mapping choices you have made (whilst in this browser session). Unless the following steps are taken to apply these changes server-side, any changes that have been made will only be stored in local storage (like cookies) for the browser they were there were made.
If you have made changes and tested them as local changes, you can then open the Keyboard Mapping tool and press the "Generate" button. You will get a pop-up with JavaScript code that can replace the relevant section (in this case beginning with: "case 'TN5250': …") in the file SCKeyDefs.js. This file can be found (on most standard installations) in the IIS folder for the FVTerm application: C:\inetpub\wwwroot\FVTerm
As this is an IIS location, you will need administrator rights to update it and may even have to copy it out (to somewhere you can edit files) and then copy it back after making your changes.
In this example only the End key was changed and in this case the host was 5250 – make sure, when you apply the change, to find the correct section of code (case 'TNVT':, case 'TN3270':, case 'TN5250': etc.). This is in the function at the bottom of the file:



function loadFKDefs(emProt)
{
    // if setFKMap returns true, already active...
    if (setFKMap(emProt))
        return false;
    // protocol-specific settings...
    switch (emProt) {
    case 'TNVT':
        //backSpaceKey='[delete]';
        fk(27, 'Esc', 'HSEND(em,"esc")');
...

}

The default code for the End key would have been:
fk(35,'End','handled=CursorEnd(em,kev)');
Where the suggested change below is:
fk(35,'End','HSEND(em,"EraseEof")');



When this change is made to SCKeyDefs.js any browser with local preferences (set per the instructions above) that are stored in the browser will need to clear those settings and all browsers that have connected in the past will ne to do a hard cache clear (control-F5 may be enough) as browsers like to hang on to JavaScript in the cache.

Further Information
Relevant key actions for your host should be available from your operations or technical support department. Keys will vary by host, operating system and even application.

Summary
If you have some key actions that are common and used often and especially by other users, it may be better to ask for the server key actions to be modified. Any key actions that are important or useful for you should be set using this method.