Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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');
}
});
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.
this will give you an idea:
https://www.qlik.com/us/trust/accessibility
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
@dannyy81 wrote:
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');
}
});
I am try to make a space bar clicker that counts the number of time you press the spacebar key. Your code uses keycode==13 for Enter key. I am not sure what keycode to use for spacebar button. Can you please help with this?
try 32