dmauro / Keypress

A keyboard input capturing utility in which any key can be a modifier key.
http://dmauro.github.io/Keypress/
Apache License 2.0
3.18k stars 313 forks source link

IE 11 Ctrl + O always opens "Open" window #92

Closed DamianS1987 closed 9 years ago

DamianS1987 commented 9 years ago

e.preventDefault(); doesn't work of course. This behaviour is prevented in Chrome, Safari, FF.

From what I've noticed this might be related to this IE11 issue - https://connect.microsoft.com/IE/feedback/details/1046712/javascript-interception-and-termination-of-some-key-events-is-broken

It would be great to find a different workaround this issue than the one suggested in the link. If you can reproduce that (use the code below) please hit "Repros" button from the link above. Maybe somebody in Microsoft will handle the issue.

Here is the code that I've used: var my_combos = listener.register_many([ { "keys" : "ctrl o", "is_exclusive" : true, "prevent_default": true, "on_keydown" : function(e) { e.preventDefault(); console.log("You pressed ctrl and o together.", e); } } ]);

http://dstefaniak-staging.com/tests/keyboard/Keypress/experiment.html

dmauro commented 9 years ago

I'm gonna close this because it's not really a KeyPress issue. Some key events will always override (hitting the windows button for instance) and that needs to be considered when choosing how to map your key combos.