Scot is showing the correct tool... as far as it goes.
I usually weld a piece of 1/2" threaded rod to the head of the key and slide a deep 1/2" socket of an appropriate size over the rod and key head. Then put some washer and a nut on and torque it up... then drive the sprocket/sheave away from the key. The bar shown is supposed to follow the same principle in that you tension it up and drive the sprocket away... when it works. Usually it bends the head of the key over.... or breaks it off. Then you start welding. Basics... drive the sprocket away as you can't pull the key. You just want to hold the key while driving the sprocket away.
Now... if ya got the sprcket driven hard against the bearing... you've got my pity. That will take a lot of pulling and welding.