Q:

Is there a way to completely disable the narrator in Minecraft 1.12.2?

Every time I write a curly bracket (my keyboard has it set up as alt+b) in game, the narrator turns on because its on the same key bind as the curly brackets. This is really anoying and I would like to turn it off somehow. Since 1.12 doesn't offer this feature, I was wondering if anyone knew a way to do this or even a mod which does this.
I read a comment on Reddit saying that there is a native library called "com.mojang:text2speech" which is responsible for the narrator functionallity but I don't want to edit my client. The user also said that these libraries could be removed from the version.json file but I wasen't able to find anything simmilar. Reddit post: https://www.reddit.com/r/feedthebeast/comments/6nos9p/question_how_do_you_permanently_turn_off_the/
thank you for reading, any help is appreciated.

A:

Unfortunately, it seems impossible.*
Keybinds (and many other options) are stored in C:\users\[username]\AppData\Roaming\.minecraft\options.txt and there is no keybind there for toggling the narrator. This means that the Control+B key combo is hardcoded within the game. I tried various methods of altering the line "Narrator: 0" to try to disable it, but nothing seemed to affect the toggle on Control+B. I also tried making the file read-only, and while it prevented settings from being saved, it did not stop the toggle from taking place in the game. I decompiled the .jar, but unfortunately the source code was completely obfuscated, so there is no way to find a specific place in the source code to cite showing the hard code.
*Nothing is impossible. You can delete the libraries as you have seen on Reddit (I cannot speak to what side effects this might have). But, there is one more way. Using AutoHotKey, you can make a script that "catches" the Control+B key combo, and replaces it with the } character. Here is the script that worked for me:

^b:: Send {}}

I notice your question asks about Alt+B, but for me the key combo was Control+B. I am assuming you made a typo, but in case you have an alternate keyboard layout the script to catch Alt+B and replace with a curly brace is
!b:: Send {}}
With this script running, the keycombo types the "}" character, but no longer toggles the narrator. If you need it to type the opening curly brace, change "{}}" to "{{}"

