I am trying to capture ctrl+z key combination in javascript with this code:
Untitled Documen
$(document).keydown(function(e){ if( e.which === 89 && e.ctrlKey ){ alert('control + y'); } else if( e.which === 90 && e.ctrlKey ){ alert('control + z'); } });
Demo