What do you mean?
Please list the sequence of events that are the stimulus, and what reaction you would like to see.
(“ . . . asign a[n] 'enter' keyword to [a/the] keypress event” doesn't really mean anything... In fact, "an 'enter' keyword" doesn't really mean anything.)