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 general

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

initShortcuts(shortcutHolderClass, bindingConf);

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-general)

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"}

Configuration list related shortcuts

To enable the keyboard shortcuts handling, the shortcuts must be registered in the main HTML template.

The following parameters are available:

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-general)

bindingConf (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

searchGlobal (boolean)

Boolean parameter which defines if the  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-general)