Qlik Community

Ask a Question

Integration, Extension & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
edwin
Specialist III
Specialist III

how do you capture keyboard events in extension?

Hi, ive seen articles on accessibility for qlik sense itself.  however i cant find any accessibility topics for extensions.  how do you capture keyboard events in your extension?

thanks,

edwin

4 Replies
dannyy81
Contributor III
Contributor III

you can use jQuery :

for example - capture enter key 

$('#someTextBox').keypress(function(event){
var keycode = (event.keyCode ? event.keyCode : event.which);
if(keycode == '13'){
alert('You pressed a "enter" key in textbox');
}
});

 

edwin
Specialist III
Specialist III
Author

hi @dannyy81 thanks for the response

ive seen this when the user is in an HTML object and presses a key

for accessibility, the whole extension is selected and the user presses a key.  to simulate this, press tab when you are in Qlik Sense until the first visualization object is selected, press press arrow keys to navigate to your extension.  then press ENTER.  thats the key i want to capture.

so its not really a user pressing a key when in a text box.

thanks for your time though.

edwin
Specialist III
Specialist III
Author

this will give you an idea:

https://www.qlik.com/us/trust/accessibility

 

edwin
Specialist III
Specialist III
Author

there is a toggleDataView method in the capability API but all of the examples are for Mashups.  can that be used for extensions?  how?

thanks,

edwin