Available: | Confluence 3.4 and later |
A Keyboard Shortcut plugin module defines a keyboard shortcut within Confluence. A Confluence keyboard shortcut allows you to perform potentially any action in Confluence using one or more keyboard strokes - for example, going to the dashboard, editing a page, adding a comment, formatting text while using the editor, and so on.
The root element for the Keyboard Shortcut plugin module is keyboard-shortcut
. It allows the following attributes and child elements for configuration:
Name* | Description |
---|---|
key | The unique identifier of the plugin module. You refer to this key to use the resource from other contexts in your plugin, such as from the plugin Java code or JavaScript resources.
Default: N/A |
i18n-name-key | The localisation key for the human-readable name of the plugin module. |
name | The human-readable name of the plugin module. Default: The plugin key. |
hidden | When Default: false |
*key is required
There is a known issue with the i18n-name-key. Please see CONF-24450.
Name* | Description |
---|---|
order | A value that determines the order in which the shortcut appears on the Keyboard Shortcuts dialog box, with respect to other |
description | A human-readable description of this Keyboard Shortcut module. |
shortcut | The sequence of keystrokes required to activate the keyboard shortcut. These should be presented in the order that the keys are pressed on a keyboard. For example, |
operation | A jQuery selector that specifies the target of the keyboard shortcut. The target is typically a component of the current page that performs an action. The
|
context | The context defines which pages the shortcut will be active on.
|
*all elements are required
You can override an existing keyboard shortcut defined either within Confluence itself or in another plugin.
To do this create a keyboard-shortcut
plugin module with exactly the same shortcut
element's keystroke sequence as that of the keyboard shortcut you want to override. Then, ensure that an order
element is added, whose value is greater than that defined in the keyboard shortcut being overridden.
NOTE: The order
element will affect the position of your overriding keyboard shortcut on the Keyboard Shortcuts dialog box. It will also prevent the overridden keyboard shortcut from being accessed via the keyboard.
You may need to push your i18n resource to the front end for the shortcut description to be displayed correctly. See CONF-24450 for instructions on how to do this.
These examples are taken from Confluence's pre-defined keyboard shortcuts:
1 2... <keyboard-shortcut key="goto.space" i18n-name="admin.keyboard.shortcut.goto.space.name" name="Browse Space"> <order>20</order> <description key="admin.keyboard.shortcut.goto.space.desc">Browse Space</description> <shortcut>gs</shortcut> <operation type="followLink">#space-pages-link</operation> <context>global</context> </keyboard-shortcut> ... ... <keyboard-shortcut key="managewatchers" i18n-name="admin.keyboard.shortcut.managewatchers.name" name="Manage Watchers"> <order>60</order> <description key="admin.keyboard.shortcut.managewatchers.desc">Manage Watchers</description> <shortcut>w</shortcut> <operation type="click">#manage-watchers-menu-item</operation> <context>viewcontent</context> </keyboard-shortcut> ... ... <keyboard-shortcut key="quicksearch" i18n-name="admin.keyboard.shortcut.quicksearch.name" name="Quick Search"> <order>40</order> <description key="admin.keyboard.shortcut.quicksearch.desc">Quick Search</description> <shortcut>/</shortcut> <operation type="moveToAndFocus">#quick-search-query</operation> <context>global</context> </keyboard-shortcut> ...
Rate this page: