Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

capture keystrokes in javascript

window.onload = function() {
   document.getElementsByTagName('body')[0].onkeyup = function(e) { 
      var ev = e || event;
      if(ev.keyCode == 70) {//&& ev.ctrlKey) {
         //do something...
      }
   }
};
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #capture #keystrokes #javascript
ADD COMMENT
Topic
Name
2+6 =