Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js addeventlistener arrow keys

addEventListener("keyup", (event)=> {
  if (event.key === 'ArrowUp') {                             
    // do Something
  }else if (event.key === 'ArrowDown') {                                        
    // do Something
  }
});
 
PREVIOUS NEXT
Tagged: #js #addeventlistener #arrow #keys
ADD COMMENT
Topic
Name
4+8 =