Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript check if two keys are pressed

// Ctrl + S save
document.onkeyup = function(e) {
  // 83 is the keycode for S
  if (e.ctrlKey && e.which == 83) {
    //Ctrl+S Pressed!
  }
};
 
PREVIOUS NEXT
Tagged: #javascript #check #keys #pressed
ADD COMMENT
Topic
Name
9+5 =