fixed small bug with event.keyCode retrieving