<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
$(document).on('keypress', function(e){
if(e.which == 13){
e.preventDefault;
console.log('323');
}
});
the above works fine
but for example e.which == 107 or 109 or 27 - doesn't work
e.keyCode instead of e.which - doesn't help
on('.keyup' instead of on('keypress - works
but I need keypress because of repeating the console.log endlessly while the key is pressed
please help