Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to check which key is pressed in jquery

$(this).keypress((e) => {
  if (e.key === "a") alert("you pressed a");
  else alert("you pressed " + e.key);
});
 
PREVIOUS NEXT
Tagged: #check #key #pressed #jquery
ADD COMMENT
Topic
Name
3+9 =