It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to temporarily disable some shortcut keys in Jira using AUI

3layer (expert) May 22, 2012

Hello everybody,

I would like to temporarily disable some shortcut keys in Jira using the AUI library.

In my specific case, I would like to disable the "m" key (comment issue) in some workflow steps.

I tried this without success:

if (AJS.$("#status-val").text().trim() == "blablabla") {
  //alert("Blocking comments...");
  AJS.$("#comment-issue").hide(); //OK
  AJS.$("#footer-comment-button").hide(); //OK
  AJS.whenIType("m").execute(function(){}); //NOK, the "m" key continues reacting to the comment operation
}

Also, I installed and tried without success the JS Shortcut Library plugin (http://www.stepanreznikov.com/js-shortcuts/):

<script type="text/javascript" src="/jira/includes/js/plugins/js-shortcuts/jquery.shortcuts.min.js"></script>

if (AJS.$("#status-val").text().trim() == "blablabla") {
  //alert("Blocking comments...");
  AJS.$("#comment-issue").hide(); //OK
  AJS.$("#footer-comment-button").hide(); //OK
  AJS.$.Shortcuts.remove({type: 'hold',mask: 'm'}); //NOK, the "m" key continues reacting to the comment operation
}

So, why the right way to acomplish this issue?

1 answer

0 votes
Séb P. Sep 08, 2013

Did you try with the last Jira? This seems to work fine now (Jira 6.0.6)!

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted in Statuspage

⭐️Would you recommend Statuspage? Leave a (honest!) review. ⭐️

Hi Community friends, We're working on sourcing more reviews on Capterra – a popular software review site –  to help teams like yours make more informed decisions when choosing an inc...

86 views 3 5
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you