click events you know where the destination is, therefore you can easily send the destination of where you're moving to the server, then the server just broadcasts to everyone else as a dumb middleman, and all the clients then render that character moving to that spot.
movement with keys however, you don't really know where the person is traveling to. thats what makes it really hard.