Documentation for JIRA 4.1. Documentation for other versions of JIRA is available too.

Purpose of this Module Type

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.

Configuration

The root element for the report plugin module is keyboard-shortcut. It allows the following attributes and child elements for configuration:

Attributes

Name

Required

Description

Default

key

(tick)

Unable to render {include} The included page could not be found.

N/A

i18n-name-key

 

Unable to render {include} The included page could not be found.

 

name

 

Unable to render {include} The included page could not be found.

The plugin key.

Elements

Name

Required

Description

order

(tick)

A value that determines the order in which the shortcut appears on the Keyboard Shortcuts dialog box (with respect to other keyboard-shortcut plugin modules).
(info) For each keyboard-shortcut plugin module, we recommend using gaps in order values (for example, 10, 20, 30, etc.) rather than consecutive values. This will allow you to 'insert' new keyboard shortcuts more easily into the keyboard shortcuts dialog box.

description

(tick)

A human-readable description of this report module. May be specified as the value of this element for plain text or with the key attribute to use the value of a key from the i18n system.

shortcut

(tick)

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, gb represents a keyboard shortcut whose operation is activated after pressing 'g', followed by 'b' on the keyboard.

operation

(tick)

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 operation element is accompanied by a type attribute that specifies the type of keyboard shortcut operation. For more information on the available types, please refer to the JIRA API documentation.

context

 

The section of the Keyboard Shortcuts dialog box on which the shortcut appears. If this element contains global or is omitted, the keyboard shortcut appears in the 'Global Shortcuts' section of this dialog box. If this element contains issue, the keyboard shortcut appears in the 'Issue Shortcuts' section of the dialog box.

Internationalisation

It is possible to include an i18n resource in your atlassian-plugin.xml to translate keyboard shortcut descriptions (via their 'key' attributes) into multiple languages. For examples code on including i18n resources in your atlassian-plugin.xml file, please refer to Downloadable Plugin Resources.

Examples

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.

...
    <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>issue</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>issue</context>
    </keyboard-shortcut>
...
  • No labels