I can't hide the keyboard

Hi all, 

I have a problem with corona.

I am doing a search bar that research the string or chat that i put in it in a table of strings.

I have to find a method to hide the keyboard without lose focus at the textfield.

Help…

And another question:

How i can see if an object is currently focussed by the keyboard?