Simple piece of jQuery that adds the class .typing to the <html> tag while the user is currently typing. I've tried several different things that all haven't worked, not sure how else to do this.
$('html').keypress(function(){
$(this).addClass('typing');
if ( /* No key is pressed again in the next 0.5 seconds */ ) {
$('.typing').removeClass('typing');
}
});