And if you need to buy a rectangular key, it is sold at Auto Parts stores in a stick, about 12 inches long.
Individual Woodruff keys, (the semi-circular type), I've found in packs of 3 at the Tractor Parts store.
Nowadays, 4 mm and 5 mm are the most used sizes for applications such as ours.
You want the exact size, don't want to grind any of the outside surface, because it is that outside surface that gives it just enough strength to lock pulleys, gears, and other parts to shafts.