I have a function with "onkeyup" event:
document.onkeyup=function(e){
var e = e || window.event;
if(e.altKey && e.which == 73) {
alert('ALT+i has been pressed');
return false;
}
}
That works in IE 11,Opera. In Firefox it doesn't work. There are similar questions over here, however all the answers I've found, based on use "KeyboardEvent.which" and "KeyboardEvent.keyCode" As far as I know, "KeyboardEvent.which" has been deprecated along with "KeyboardEvent.keyCode". What would be the proper way to implement this method using Javascript? If possible without "addEventListener("keyup"...)" method.