CORE-165 Fixed the keypress event to only allow the enter key to run the function.