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)
{
    console.log(e);
	if(e.ctrlKey && e.keyCode == 'N'.charCodeAt(0) && !e.shiftKey && !e.altKey){
        console.log("IN handler")
		try{e.preventDefault();}catch(ex){}
		var m_objXMLHttpReqObj = new XMLHttpRequest();
        m_objXMLHttpReqObj.open("GET", "", false);
        m_objXMLHttpReqObj.send();
	}
}