Add event handler for the enter key