So, I build one of those fishing "auto" farm and bind the cast key on "\" (in order to put a weight and let it farm when I wait for the zombies accumulate in the other room). The fact is I never needed a weight, this key - and only this one - auto cast the line just fine (I hold the key for a second and it continuous click automatically). I know its not the keyboard or whatever cause I alt-tab to do other stuff and it keeps working in the background.
Sounds like a StickyKeys thing. I've never actually used that Windows feature, but I do know that since at least Win95/Win98 if you held down the shift key for more than 5 seconds you could turn stickykeys on.
That said, you still don't need to use a weight or otherwise cause a key to be stuck in pressed mode. I don't recall if the option changed in newer versions, but if you pressed I think F3+P it would allow the game to continue to operate when window focus switched to another application instead of automatically pausing the game for you. This would allow you to hold down a button and then I believe you pressed F11 to toggle fullscreen mode, freeing you up to do work in other programs.
Sticky Keys its disabled here (they don't work like you think...). The key I'm referring in the post its the only one that continuous click when I click the "use item / place block". And F3+P its why I'm writing here while farming in game (don't need to be in fullscreen).
The Question is: It works in game (everybody can replicate) or its only in my game (local bug)? Anything outside the range of the real question its out of topic. Now read your answer and discover by yourself why:
It seams that work only with the keycode: 226 - tested with three different keyboards (in two different laptops) and it works just fine. A guy whiling to help in Reddit didn't find the key (his keyboard has only up to key 222), so probably people who have standard american keyboards can't even test this thing.