How to disable single JIRA shortcut ?

Kacper Kustra November 27, 2016

I want to disable "i" shortcut (not interested in disable all of them). Can someone help me and tell how to do it ?

2 answers

0 votes
Kacper Kustra November 28, 2016

@Volodymyr Krupach thx for help wink
This work perfect:

AJS.$(document).keypress(function(event) {
			if (event.keyCode == '105' ){
			//	console.log('hakunamatata + karamba');
			 event.stopImmediatePropagation();
			}
		});
Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 28, 2016

Welcome smile.

Steven Mustari
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 27, 2017

We have this same exact issue and need to disable the "i" function in our instance. Where exactly would you have to put this code? I tried putting it in the annoncement banner with no success.

0 votes
Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 27, 2016

AFAIK, there is no way to disable/enable single shortcut through JIRA UI.

You can do it by creating custom addon with Keyboard Shortcut Plugin Module but this looks like too much effort.

Kacper Kustra November 27, 2016

I made my own plugin but it did not override shortcut or disable it :/ just add another action

Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 27, 2016

Check the paragraph "Overriding Existing Keyboard Shortcuts". Important item:

ensure that an order element is added, whose value is greater than that defined in the keyboard shortcut being overridden.

Kacper Kustra November 27, 2016

I should be more specific, because there is another problem laugh 
When I add plugin with shortcut "i" action, I can override it only in overlap "Issues". My plugin is not working in "Backlog" or "Active sprints". 

Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 27, 2016

Did you try any other shortcut on "Backlog" or "Active sprints" screens without overriding? I suspect that Keyboard Shortcut Plugin Module is not supported there.

You can always add JavaScript handlers (quick googling give me this) and push your JS resource module to atl.general context.

Kacper Kustra November 27, 2016

Yes, you are right. Keyboard Shortcut Plugin Module is not supported there. When I add JS, "Assign to me" is still working. I can not override it there and I don't know how to block it. 
I made new shortcut (work everywhere issues, backlog etc.) but I'm stuck with blocking default "i" shortcut. 

 

Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 27, 2016

I can not override it there and I don't know how to block it. 

You can try to do it via pure JS by catching the appropriate key stroke and making sure it's not passed future (I guess that "return false" form the event handler should do the work). This will work if your JS is loaded before JIRA JS that declares 'i' handler. So you have to try it.

Suggest an answer

Log in or Sign up to answer