Unnamed controls in 1.13-26.2 use scancode. before a number, whereas 26.3 uses key.keyboard. before a number. The game makes no attempt to upgrade one to the other due to the fundamentally different numbering systems, but instead of simply converting to Not Bound, the game instead runs into an error and will delete several entries in options.txt, which is wrong and forces the user to set things back to the way they were manually.
Easily fixed by simply setting invalid key bindings to Not Bound, preventing data loss.
Attachments
Comments 6
Can you provide repro instructions? Just by reading this report it isn’t clear to me what pre-existing options I might need to have in order to notice a change once I’ve upgraded.
Do you have a keyboard with nonstandard buttons? Simply bind one of the game controls to it in 26.2 (it should show up as scancode.###), then load the game in 26.3 using the same profile. Some, but not all, options will be reset (for example, the debug hitboxes keybind will be reset to default if you had a custom binding for it).
It does, it just takes time. My keyboard doesn’t have any nonstandard buttons, but I manually edited options.txt to set Hotbar Slot 1 to scancode.150 and Show Hitboxes to M. It showed scancode.150 and M respectively in 26.2, but in 26.3 Snapshot 9 shows 1 and B respectively, and I got the same error you did, so I have marked this as Confirmed. (None of my other custom bindings were affected afaict).
Thank you for helping us improve Minecraft! We saved your files: