Add key up and key down management