Search
 
SCRIPT & CODE EXAMPLE
 

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...
      }
   }
};
Comment

PREVIOUS NEXT
Code Example
Javascript :: sveltekit tailwind 
Javascript :: How to initialize select2 dynamically 
Javascript :: nodejs: http:send HTML to the Browser 
Javascript :: use js to get select value 
Javascript :: javascript promise.all 
Javascript :: javascript remove uniques from array 
Javascript :: trigger a function inside child from parent vue 
Javascript :: angular 9 radio button checked 
Javascript :: GET http://localhost:8000/js/app.js net::ERR_ABORTED 404 (Not Found) in laravel 6 
Javascript :: checkbox event listeners 
Javascript :: angular radio box already showing checked 
Javascript :: javascript loop through an array backwards 
Javascript :: how to generate random color hexcodes for javascript 
Javascript :: how to access key value pair in javascript 
Javascript :: js push array into array 
Javascript :: Get size of a View in React Native 
Javascript :: javascript converting an array into a map 
Javascript :: Start Express Properly 
Javascript :: zustand simple counter 
Javascript :: date format date and time in js 
Javascript :: add id to Array of Object 
Javascript :: javascript for loop array of objects 
Javascript :: string length in javascript 
Javascript :: how to setup icomoon in react js 
Javascript :: Missing script: "start" react 
Javascript :: mongoose connection in express 
Javascript :: Javascript - convert string value to lowercase 
Javascript :: react native nav bars 
Javascript :: angular convert map values to array 
Javascript :: Could not resolve project :react-native-iap mergedebugassets 
ADD CONTENT
Topic
Content
Source link
Name
8+8 =