I have a lot of buttons in my web tool. I have .click() events for each of them. I am not sure how to add a keyboard shortcut along with the click so that the user can either click the button or press a key (e.g 'k') on the keyboard to call the button function.
$('#myButton').click(function () {
// here is my code to be run when clicked
});
how to add for example 'k' key to this button. I also want to be able to disable the click and keypress at some point. So how can I then disable both of the event listeners?