Rate this page:
JIRA 4.1 and later
In JIRA 4.2 and later, the element accepts an optional child element (), which prevents the keyboard shortcut from appearing on the keyboard shortcuts dialog box. Existing keyboard shortcuts can also be overridden.
A keyboard shortcut plugin module defines a keyboard shortcut within JIRA. A JIRA keyboard shortcut allows you to perform potentially any action in JIRA using one or more keyboard strokes - for example, going to the Dashboard, browsing a project, moving your cursor to a field on a JIRA form, or creating, editing or commenting on an issue.
The root element for the keyboard shortcut plugin module is . It allows the following attributes and child elements for configuration:
In the example, is the key for this particular module declaration, for , in this case.
The localisation key for the human-readable name of the plugin module.
|The human-readable name of the plugin module.
Default: The plugin key.
When , the keyboard shortcut will not appear in the Keyboard Shortcuts dialog box.
A value that determines the order in which the shortcut appears on the Keyboard Shortcuts dialog box (with respect to other plugin modules). This element is also used to override existing shortcuts displayed on the Keyboard Shortcuts dialog box (see Overriding Existing Keyboard Shortcuts).
A human-readable description of this keyboard shortcut module. May be specified as the value of this element for plain text or with the attribute to use the value of a key from the i18n system.
The sequence of keystrokes required to activate the keyboard shortcut's operation. These should be presented in the order that the keys are pressed on a keyboard. For example, represents a keyboard shortcut whose operation is activated after pressing '', followed by '' on the keyboard.
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 element is accompanied by a attribute that specifies the type of keyboard shortcut operation. For more information on the available types, please refer to the JIRA API documentation.
The section of the Keyboard Shortcuts dialog box on which the shortcut appears and defines where the keyboard shortcut can be used in JIRA. If this element contains:
You can override an existing keyboard shortcut defined either within JIRA itself or in another plugin.
To do this create a plugin module with exactly the same element's keystroke sequence as that of the keyboard shortcut you want to override. Then, ensure that an element is added, whose value is greater than that defined in the keyboard shortcut being overridden.
While the element may affect the position of your overriding keyboard shortcut on the Keyboard Shortcuts dialog box, it will also prevent the overridden keyboard shortcut from:
It is possible to include an i18n resource in your atlassian-plugin.xml to translate keyboard shortcut descriptions (via their '' attributes) into multiple languages. For examples code on including i18n resources in your file, refer to Downloadable Plugin Resources.
These examples are taken from JIRA's pre-defined keyboard shortcuts for going to the Dashboard, commenting on an issue and moving to the next action item on an issue view.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
... <keyboard-shortcut key="goto.dashboard" i18n-name="admin.keyboard.shortcut.goto.dashboard.name" name="Goto Dashboard"> <order>10</order> <description key="admin.keyboard.shortcut.goto.dashboard.desc">Go to Dashboard</description> <shortcut>gd</shortcut> <operation type="followLink">#home_link</operation> </keyboard-shortcut> ... ... <keyboard-shortcut key="comment.issue" i18n-name="admin.keyboard.shortcut.commentissue.name" name="Comment Issue" state='enabled'> <order>80</order> <description key="admin.keyboard.shortcut.commentissue.desc">Scrolls to comment input and focuses it</description> <shortcut>m</shortcut> <operation type="click">#comment-issue</operation> <context>issueaction</context> </keyboard-shortcut> ... ... <keyboard-shortcut key="move.to.next.action.item" i18n-name="admin.keyboard.shortcut.movetonextactionitem.name" name="Move to next action item" state='enabled'> <order>110</order> <description key="admin.keyboard.shortcut.movetonextactionitem.desc">Moves to the next action item on view issue page</description> <shortcut>n</shortcut> <operation type="moveToNextItem">.issue-data-block:visible</operation> <context>issueaction</context> </keyboard-shortcut> ...
Rate this page: