added toggle menu and dismiss keyboard when closing/opening

This was useful to me, so maybe could be useful to other :)