I've been playing minecraft the past few days until yesterday I came across this game breaking keyboard issue. I'm not sure if it's a bug or not. What happens is when I'm moving around with the WASD keys all of a sudden my character continues walking in any direction or just stops. It also happens when I press shift or space. I know haw to stop it from happening; by pulling up a GUI or pressing a key in the direction the character is going. The thing is it just starts back up again. I use a laptop keyboard, but I've tried using a wireless Logitech keyboard but it still did the same thing. It only does this on Minecraft. It even does it on modded Minecraft lauchers such as FTB and Technic Launcher.
Keyboard issues when moving (moving as if im holing it down)