Open Client Function Key Toolbar

PROIV Function Keys can inadvertently control browser features, for example F1 displays a help page, and F11 displays a full screen web page. Not all browsers allow this functionality to be turned off by a page script, and therefore, some Function Keys may not work as expected in a PROIV Function. To help resolve this issue, Open Client has introduced a built-in toolbar for the Function Keys that can be enabled by setting the Softkeys.enabled property in the Messages.properties file to TRUE. Click here details on the Messages.properties file. The toolbar can be customised by copying the following files from the …/appResources/appObjects folder to the appObjects folder in your application's resources folder (preserving their folder structure) and amending them appropriately.

The files copied to the proiv folder in your application resources folder must not be modified.

The softkey.css file contains the style information for the toolbar, the soft_key_object.json file contains various settings which can be changed if required, and the js files contains the toolbar implementation details..

Defining Soft Keys

The softkeys section in the soft_key_object.json file is an array of objects, which define the Soft Keys, for example:

  softkeys: [

    {keyCode:112,text:'F1'},

    {keyCode:113,text:'F2'},

    {keyCode:114,text:'F3'},

    {keyCode:115,text:'F4'},

    {separator:true},

    {keyCode:116,text:'F5'},

    {keyCode:117,text:'F6'},

    {keyCode:118,text:'F7'},

    {keyCode:119,text:'F8'},

    {separator:true},

    {keyCode:120,text:'F9'},

    {keyCode:121,text:'F10'},

    {keyCode:122,text:'F11'},

    {keyCode:123,text:'F12'}

  ],

The following properties in these objects can be defined:  

For example, the following code adds an image to a Soft Key where help.gif is an image in the …/appResources/appImages folder.

{keyCode:112,text’F1’,image:’help.gif’}

In addition to key specific properties, there are two other properties in the soft_key_object.json file that apply to all Soft Keys:

 The following table lists the available Key Codes that can be mapped in the soft_key_object.json file.

Key Code

Functionality

112

F1 – Help

113

F2 – Cancel

114

F3 – Save

115

F4 – Window

116

F5 – Add

117

F6 – Change

118

F7 – Delete

119

F8 – Lookup

120

F9 – Expand

121

F10 – Edit

122

F11 – not defined PROIV

123

F12 – not defined PROIV

27

Esc

33

Page Up

34

Page Down

38

Up Arrow

39

Right Arrow

40

Down Arrow

Changing Soft Key Mappings

If required, you can change what the Function Keys do. Firstly, alter the mapping of the System Function Keys on the Terminal Type Properties window on the System Fn Keys tab in PROIV. Click here to see an example screenshot of the Terminal Type Properties window, where the mappings of Add and Window are swapped round.

Secondly, swap the labels in the soft_key_object.json file. The following code swaps the labels round:

{keyCode:115,text:'Add'},

{keyCode:116,text:'Window'},

Comment on this topic

Topic ID: 800081