the method that will be called when the Enter key is pressed
The method is used in the inner logic and not intended for direct use.