i was wondering how do i trigger the event keyCode composed by Ctrl+z
and the event keycode composed by Ctrl+Shift+z
?
Use e.which
which has been normalized cross browser by jquery.
$(document).keydown(function(e){
if( e.which === 90 && e.ctrlKey && e.shiftKey ){
console.log('control + shift + z');
}
else if( e.which === 90 && e.ctrlKey ){
console.log('control + z');
}
});