Forge required.
A mod that holds your Sprint key, revamped from AutoSprint, all credit goes to "RedPer" for the original mod. https://minecraft.curseforge.com/projects/auto-sprint-mod
Original mod created by RedPer, all credit goes to him, the only thing I did here was porting it to 1.12.2 Forge version of the game + changing some keys and render postions to make it look like the original 1.7 - 1.8 "ToggleSneak".
No other modifications were made.
When you first launch the mod your default keybind to toggle sprint will be "R", you can change this under the control settings.