Previously worked well in all browsers but for some reason ALT GR dosent work in chrome. Im totaly out of idees to get this to work..
Its working with CTRL + ALT + Q in all browsers
Using Chrome Version 67.0.3396.87 (Officiell version) (64 bitar)
$(document).on("keydown", function(event)
{
console.log(event.ctrlKey);
console.log(event.altKey);
// AltGr+Q
if(event.which === 81 && event.ctrlKey && event.altKey)
{
$("#notes").empty('');
$("#notes").append("Success!<br/>" , " Event: ", event.which, " ctrlKey: ", event.ctrlKey, " Altkey: ", event.altKey);
return false;
}
else
{
$("#notes").empty('');
$("#notes").append("Fail! <br/>" , " Event: ", event.which, " ctrlKey: ", event.ctrlKey, " Altkey: ", event.altKey);
return false;
}
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div>
<span id="notes">Klick to focus snippet and test keydown event, works well in Explorer/Edge but not in chrome</span>
<div/>