The keyboard shortcut handler component uses the Javascript library Mousetrap (https://github.com/ccampbell/mousetrap).

Installation:

To use the keyboard shortcuts handling, the following JavaScript resources must be included in the header of the used HTML template where all the other JavaScript libraries are defined (e.g. templates/Root.html):

mousetrap.min.js

Third-party library which provide the functionality for the shortcuts handling.

shortcuts.js

Library which binds the shortcuts functionality to the JAXFront Visualizer components.

<script language="JavaScript" src="js/jquery/plugins/mousetrap.min.js" type="text/javascript"></script>
<script language="JavaScript" src="js/jquery/plugins/shortcuts.js" type="text/javascript"></script>

Configuration

If the configuration is loaded properly, the registered shortcuts will be visible on the tooltip informations of the concerned actions (if a link is provided within the visualizer component)

The following configurations are possible:

Configuration general

To enable the keyboard shortcuts handling, the shortcuts must be registered in the main HTML template with the function:

initShortcuts(shortcutHolderClass, bindingConf, searchGlobal);

shortcutHolderClass (String)

String which holds the class defining the starting point of an element for searching the shortcuts actions. (e.g. for lists the class is "jax-list-holder-div")

bindingConf (String)

For the mapping of the shortcut keys, each shortcut can be paired with an html element id which holds the action called by the fired shortcut.

{"newLI":"alt+n", "cpLI":"alt+k", "delLI":"alt+r"}

searchGlobal (boolean)

Boolean parameter which indicates if the focused field is not within the shortcutHolderClass, the shortcuts should be searched document wide instead.

Configuration for list related shortcuts

To enable the keyboard shortcuts handling for a list component the shortcuts could be registered with a list related constructor, which must be registered in the main HTML template:

registerListShortcuts(simplifiedConf, searchGlobalList); 

simplifiedConf (String)

JSON-String for mapping each list function to a corresponding key. ("function" : "key kombination")

{"new":"alt+n", "copy":"alt+k", "delete":"alt+r", "moveUp":"alt+u", "moveDown":"alt+i"}

Available id's are:

iddescription
newAdd a new list entry
copyCopy the selected list entry
deleteDelete the selected list entry
moveUpMove the selected list entry up
moveDownMove the selected list entry down

searchGlobalList (boolean)

Boolean parameter which indicates if the focus is not within a list, the first list in the view should be applied if available instead.

Supported keys/shortcuts

The shortcuts should be defined as combination like "alt+n", with the plus as seperator.

The following keys are available.

Modifier keys

Special keys

Other keys

All other keys can be referenced by name like a, 3, /, $ ...

Browser support