Is that pushbutton able to process one command only?

Hi guys I am am facing one problem for my charity project . In this project I will be using pushbutton,
basically my project run as below.

-When pushbutton pressed motor only turning direction once , even when I still continue pressing the pushbutton it will not turning anymore until I released the pushbutton and pressing again .

Is this able to process? now I am using LED for trying but I try to use timer counter and interrupt but when I holding the press the led continue lighting up. Any suggestion ?

You need to detect when the button becomes pressed rather than when it is pressed

See the StateChangeDetection example in the IDE

yes i tried the statechangedetection already but it seem not working

Then you did something wrong. Please post the code that you tried

An update to the state change detection example that may help.