Give the functionality of pressing the button and dismiss the keyboard