You should only add this event inside the onKeyDown. This way, you have less events being held. Less prone to bugs too.