Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

HTML5 Accesskey Attribute: you may not need JavaScript to add Keyboard Shortcuts

// Register the key handler 
document.addEventListener('keyup', function(e){
    // This would be triggered by pressing CTRL + A
    if (e.ctrlKey && e.keyCode == 65) {
        window.location.href = "http://ourcodeworld.com"; 
    }

    // Or with ALT + A
    //if (e.altKey && e.keyCode == 65) {
    //    window.location.href = "http://ourcodeworld.com"; 
    //}
}, false);
Comment

PREVIOUS NEXT
Code Example
Javascript :: store current date in chrome storage extension 
Javascript :: unity rotate object to match normal 
Javascript :: reference self in ajax callback 
Javascript :: Oops! Something went wrong! :( ESLint: 6.8.0. You are linting "node_modules/ipaddr.js" 
Javascript :: How to send JSON Web Token (JWT Token) as header with Postman and golang 
Javascript :: int cating javascript 
Javascript :: regex to get part of word nodejs 
Javascript :: set stange beckground color easeljs 
Javascript :: node code comment process real time 
Javascript :: receiving big response node js 
Javascript :: how to fix eslint jsx not allowed in js 
Javascript :: reverse a number in javascript without using inbuilt function 
Javascript :: infinite scrolling firestore vuejs 
Javascript :: password textInput not working on android 
Javascript :: automatic jquery interceptor with token 
Javascript :: install phantomjs Alpine Linux 
Javascript :: simple javascript router 
Javascript :: how to check if a kendo drop down is enabled js 
Javascript :: node js reuire json shows onject 
Javascript :: how to replace nan with a value in js 
Javascript :: mat slider in a reactve form 
Javascript :: strip js for subscription 
Javascript :: redux http library 
Javascript :: what does l do in javascript 
Javascript :: VUE DECLARE COMPONENT IN MAIN.JS 
Javascript :: js remove plus 
Javascript :: snippets chrome devtools debugging 
Javascript :: redux filter movies list container 
Javascript :: make the background color of page in the loading js 
Javascript :: validate url in javascript 
ADD CONTENT
Topic
Content
Source link
Name
3+6 =