Here is the Demo
I am trying with
$('.container').on('keyup', function(e){
console.log(e.keyCode);
});
but its always the first key that is pressed!.
Note - I want the detection to work on keypress
as I am validating the div on each keypress