i use web app work, , 1 of shortcuts use ctrl+m. however, i'm typing , mistakenly hit ctrl+n mistake, , instead of triggering action in web app, open new window. able prevent that, can't seem figure out how. far i've tried running code every time page loads, doesn't seem anything. (ignore fact i'm using switch 1 key, have few other custom ctrl shortcuts don't override chrome shortcuts working, removed them readability)
document.onkeydown = function(e) { if(e.ctrlkey === false) { return; } switch(e.which) { case 78: //just keep opening new tab when merging cells e.preventdefault(); e.stoppropagation(); break; default: return; } };
you can find github issue gateone project discussing same problem here.
they workaround "create application shortcut" can override ctrl+n key.
Comments
Post a Comment