The simple answer is that you should not send key input, but rather their absolute position. This will make sure that the entities are always the exact same place on both your own client, other clients and the server.
To get smooth movement, you might want to consider adding additional client code that smooths it. A technique could be: If your game syncs every 50 ms(20 times a second), and the player moved 1 meter, estimate how much it should move, so that it's at the position at next sync. Heres a picture to describe it:
Ps. This a technique I just made up, so theres probably someother techniques that will give you even smoother movement, but this is pretty easy to implement.