closing menu window

I am running Kodi 16.1 and trying to work out remote control functions.When I am in various menu windows unless I use a mouse to click on the “x” in the top right corner I can’t close the window. I can use the “back” button but I want to use a button on the remote to close it. Can someone tell me what that function would be so I can use my MCE control to close it? Thanks