I don't know about windows or linux, but on mac it would be because your key repeat is very fast, and probably on windows and linux too. This is not a bug because every time minecraft gets the signal that E or F5 have been pressed, it switches.
I can play minecraft perfectly fine with sound muted and no sound subtitles.
Is this on a server? You know some servers have lag, especially free ones.
I don't know about windows or linux, but on mac it would be because your key repeat is very fast, and probably on windows and linux too. This is not a bug because every time minecraft gets the signal that E or F5 have been pressed, it switches.