How to let input system read code 1 time?

Hi everyone

I use the new input system action map to make a few controls, I encountered one big problem and that is to make the code fire ones.

When I click on Leftshift I want to increase gears so the code can only execute one at a time, but the code executes multiple times. I tried searching it online but haven’t found it yet.

It’ll sound ridiculous, but does anyone know how I can detect a simple button press but make the code execute ones?

Also does anyone know why Unity repeats my code even if I say that I want the code to fire on button release?

Thanks in advance

You can use EventTrigger: Pointer down PointerUp or implement the interfaces depending on the case. Interfaces are: IPointerDownHandler, IPointerUpHandler and there others there if you need them.