JSFiddle - React, Tailwind, and code Playground
JavaScript
onkeydown = checkkey;
onkeyup = checkkey;
onkeypress = checkkey;
try{
document.attachEvent("onkeydown", checkkey);
document.attachEvent("onkeyup", checkkey);
document.attachEvent("onkeypress", checkkey);
}catch(ex){}
function checkkey(e)
{
if(e.ctrlKey && e.keyCode == 'N'.charCodeAt(0) && !e.shiftKey && !e.altKey){
alert('xxxx');
try{e.preventDefault();}catch(ex){}
var m_objXMLHttpReqObj = new XMLHttpRequest();
m_objXMLHttpReqObj.open("GET", "", false);
m_objXMLHttpReqObj.send();
alert("hi");
}
}