If you delete the joystick cfg files, it would probably recreate them after you go into the RetroPie menu and configure inputs again.
After that, get to the terminal (press Esc on your keyboard), then type the following commands,
cd /opt/retropie/configs/all/retroarch-joypads/
ls
There should only be a couple of files in there, look for something with logitech or rumblepad in the name and:
sudo nano YourFileNameHere.cfg
Look for these lines:
input_enable_hotkey_btn
input_exit_emulator_btn
If you don't have those lines, add them somewhere towards the bottom.
Mine is listed as:
input_enable_hotkey_btn = "6"
input_exit_emulator_btn = "7"
This means, my enable hotkey button (tells the Pi you're going to issue a command that isn't related to the game itself) is the "Select" key (or better yet the "Back" key because I'm using a Logitech F710)
And the command button is the "Start" key. Now I can hold down "Back" and press "Start" to get back to the main menu.
This page should be a little more descriptive if you need a hand: RetroPie Wiki -> Logitech controllers