Push Button API and not Switch API

Hi,
The digitalWrite API is similar to switch API. I need to get push button API to use button as accelerator pad .

Thanks in advance❤️

@yeshwant.naik sir please…