Versionen im Vergleich

Schlüssel

  • Diese Zeile wurde hinzugefügt.
  • Diese Zeile wurde entfernt.
  • Formatierung wurde geändert.
Kommentar: Migrated to Confluence 5.3

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

Inhalt

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

...

Available id's are:

iddescriptiondefault shortcut
newAdd a new list entryalt + ctrl + n
copyCopy the selected list entryalt + ctrl + c
deleteDelete the selected list entryalt + ctrl + d
moveUpMove the selected list entry upalt + ctrl + up
moveDownMove the selected list entry downalt + ctrl + down
selectPreviousSelects the previous list entryctrl + up
selectNextSelects the next list entryctrl + down

If no simplifiedConf param is passed, the following defined default value is taken in place:
{"new":"alt+ctrl+n", "copy":"alt+ctrl+c", "delete":"alt+ctrl+d", "moveUp":"alt+ctrl+up", "moveDown":"alt+ctrl+down", "selectPrevious":"ctrl+up", "selectNext":"ctrl+down"}!

searchGlobalList (boolean, [optional])

...

If no searchGlobalList param is passed, it's default value "true" is taken in place.

System Variables

To simplify the configuration of the shortcuts, the system variable shortcutConfig can be used within the javascript call.

Codeblock
themeEclipse
languagejs
titleconfiguration with system variable
registerListShortcuts('${shortcutConfig}', true);

The variable shortcutConfig can be configured with the following options:

  1. Declaration with the config key jaxfront.html.shortcuts.keyConfiguration within the jaxfront.xml config file
  2. Setup throug the Global-Definitions with the function setShortcutKeyConfiguratio(String) of GlobalDefinition.java

Supported keys/shortcuts

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

...