This macro does not help much in any way, but it may be useful to someone. It works not only in Minecraft but also in most games, if you have a squat on another button, then changing for example from «Ctrl» to «Shift» or «C» depends on how convenient it is for you. You clamp the button on which you put the macro and it gets stuck very quickly (spamming squats).
Download the program (Download) and go to the macro editor
press the button «Open file»
and select the downloaded file
assign a macro to a key and run the program