Quantcast
Channel: Internet Explorer 8, 9, 10 Forum
Viewing all articles
Browse latest Browse all 1908

Disable Ctrl+O in IE9 using JavaScript

$
0
0

Hi!

I try to disable few default hotkeys in IE9, and add new functionality.

I use this JavaScript code:

document.onkeydown = function (e) {
  if (e.ctrlKey && e.which == 79) { // disable Ctrl+O
        e.preventDefault();
    }
}

This solution works for Ctrl+N, Ctrl+W, Ctrl+B, etc., but not workin for Ctrl + O.
Can someone explain me, why? How can I prevent the default behavior?

Please help me!


Viewing all articles
Browse latest Browse all 1908

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>