Follow by Email

Wednesday, November 20, 2013

javascript capture ctrl+key

Using below Javascript snippet you can trigger things in your web application based on key combinations


  document.onkeydown = function(evt) {

          evt = evt || window.event;


          if (evt.ctrlKey && evt.keyCode == 20 ) {


              //**Open a new tab and shift the focus to it

    'url to your page','_blank');





The below website can be used to look for the key codes

No comments:

Post a Comment