This bug will automatically swing the hammer in every direction, as if you were doing a spin attack.
So to replicate it.. assign B to the Hammer and charge the Sword, then when you hear the "spin sound" press B.
It also works for the wand, not sure about the other items because i cant get them to work.