How do I handle multiple keys?
Like I have multiple saving options, and I want to handle one button at a time. I am not getting how to handle multiple saving buttons on an entire page. I am using jQuery in an ASP.NET MVC project. How can I do this?
I am using this code:
$(document).bind('keydown', 'ALT+S', function() {
// Alt + S for saving shortcut
if (e.keyId == '#btnSaveCompany') {
// Here I want to handle a function for the key btnSaveCompany
funSaveCreation();
}
});
Here I want to handle the save button for a keyboard shortcut for saving. I want to handle multiple buttons through this.