#141, fix assertion related to event.keyCode and charCode