I have a page on which I want to override default ctrl+s behavior. When typing this on google or stack-overflow, I can only find ways to do it with jquery:
$(window).keypress(function(event) {
if (!(event.which == 115 && event.ctrlKey) && !(event.which == 19)) return true;
alert("Ctrl-S pressed");
event.preventDefault();
return false;
});
I'd like to have a clean way to do it with vanilla JS.