Options.txt

options.txt is the file that stores all the options changeable in the in-game options menu and various other information the game needs to store after quitting. It is found in the  folder $$ or in the   folder $$, and can be edited with any basic text editor to change options. Most settings can be changed in-game, but a few can be changed only by editing this file.

If you try to access an older version of Minecraft it may crash, because the newer options.txt dosen't work with the old versions of the game. To fix this you just delete the file or move to your desktop.

Java Edition
Each line represents a single option or piece of data, with the option followed by a colon followed by the value of that option. A list of all available key/button numbers for the controls options is available at key codes.