I'm currently having the same issue here,Was playing with my friend through steam,i afked for a farm and came back unable to move ,i can only move while holding space bar and pressing movement key to move,Mouse works fine
I have tried:
Restarting laptop , keybinds , terraria
Verify integrity of File in Terraria
This happen a few hours after updating my game to 1.4.0.3