Search database when enter is pressed

I have been trying for a long time, but I do not get it. can you try to make an example to me? I do not figure out how to choose the enter button