Truly depends.
I find that having a good mouse is more helpful when playing FPS games (Battlefield, COD, Medal of Honor etc..)
- On-the-fly DPI changer is very helpful for aiming changes.
For example when switching from a pistol to a sniper you need to lower your DPI to get better accuracy
- Being able to define certain keys or record macros (set key X to throw a grenade for example)
- When combined with a decent mouse mat - gives a really good response and accuracy with no "bumps"
Head-shots all the way!
However, having a good keyboard is more helpful in MMORPG / RPG (WoW, Dragon Age, Path of Exile etc..)
- Here you can have more complex macros that includes many keys (useful for combo attacks)
- Mechanical keyboard is SO MUCH MORE comfortable, even when you're not gaming.
Yields better response time + easier to press + lasts longer than a normal membrane keyboard.
I would go for the keyboard as it has "dual functions". Helpful when you're playing and as well when you're not.
It's totally up to you though