How to open minecraft game menu without pressing esc?

So… I made a very stupid mistake and changed a control to 'esc'. Now I can't open the minecraft menu because when I press 'esc' it does something else. And I can't change the controls back because I can't open the game menu! How can I change my controls?

Go to the main menu via restart and go to the options menu that way.