From the look your picture the key and keyway look ok. Remove the gear and check them both, as nsman says the crank end can fracture around the keyway. As long as the key is still a snug fit then you may be able to get away with just a new primary drive gear and key, around Ł85 from Taffy I think. The gear needs to be heated in the oven for half hour then it will slide on, use bearing lock on the gear and thredlock on a new nut.
Whilst we're on the subject of primary drive gears...friend of mine has an 08 FE650, bought May last year, to cut a long story short basically the bike got nosier up to the 22 hours it was run, then locked up whilst on tick over. I took the clutch cover off and the primary drive nut was nearly off the end of the thread and the gear was cracked, the key was sheared and the keyway was twice the size it should be due to the gear chattering around on the crank for 22 hours, end of the crank also fractured badly.
So, bike needs new crank, gear etc plus whatever damage may have occurred up the top end due to the gear spinning 45 degrees on the crank, expensive to say the least.
The nut was obviously never torqued from the factory and there was no evidence of any threadlock. So, he was just on the verge of sending the engine off to be repaired when he thought, lets make a call to Husaberg and see what they say, not being hopeful after all, it is only a 30 day warranty and the bike is over a year old. It turned out to be a worth while call, they are paying for all the parts, inc crank, as long as he takes it to a Husaberg or KTM dealer he just has to pay labour, approx Ł300. They would have paid for the labour too if he had it serviced by a Husaberg dealer.
Now that's what I call a good service, well done Husaberg.