Leonardo Gamepad Analog as Digital inputs?

Do you have a link to actual position on on that forum. Incidentally I came across the attached code which does work after a fashion. It acts almost like a motorised trim rather than a simple Scroll Up Scroll Down action. You have to gone one click back or forward to stop the rotation.