I am trying to fire an event when a certain key is pressed. It works great with this code:
$(document).keypress(function(e){
switch(e.which){
case 96:$("a.quicklinks").trigger('click');
break;
}
But if the user is in the form field, I would like to disable this behavior. How to check if the user enters into the form field for this? Thanks.
source
share