If anyone wants to use a controller for a mouse on Raspberry Pi you can install this:xserver-xorg-input-joystick
It saved me time rather than trying to configure joy2key.