Two things:

Is the easiest way to put a flat section on a 5mm motor shaft to use a dremel with a grinding attachment?

And

What size grub screw should I use in a pinion on a 5mm shaft?