The only switches I have every worked with are basic switches with on/off state, but I want to be able to add a power button to my project that is just like the power button on a cell phone. (hold for x seconds to power on, hold for x seconds to power off). It should also obviously act similarly to a momentary switch that doesn't depress or change levels when it is clicked.
I know this requires specific programming within the controller; I'm just confused about the best switch setup to accomplish this.
Do I accomplish this with a certain type of momentary switch? I am getting confused by the different types on digikey, such as this one: https://www.digikey.com/product-detail/en/e-switch/TL3315NF100Q/EG4620CT-ND/1870400