PS3 button question(SOS)

How to program for buttons of ps3???.. Like if i want to use some part of my bot until i dont release the button(like press and release in ps2)… LIKE IF I WANT TO MOVE THE BOT FORWARD USING UP BUTTON AND WHEN I RELEASE THE BUTTON IT SHOULD STOP??? PLZZZZZZZZZZZZZZZZZZZ HELP… SOS