Implemented enter key functionality.