Sleep after hiding the keyboard