The problem with keydown is that if the user presses and holds the enter key, it will send this event many times.