document.addEventListener('keydown', (e) => { e.preventDefault(); if (e.key.toLowerCase() === 's' && e.ctrlKey) { // Add your code here alert('S key pressed with ctrl'); } });