Fix bug where listeners interpret key release events as key press events