document.addEventListener('keydown', (ev) => { if (ev.code == 'KeyS' && ev.ctrlKey) { ev.preventDefault(); save_options(); // alert ('Ctrl+S') } });