For me that question falls under the category of
Soft power switching circuits "soft" = software =->microcontroller; with a short press of a momentary tactictial switch creates a signal pulse at the input of a microcontroller that latches or maintains that state untill you short press or toggle the switch again changing & maintaining or latching the opposite state "on or off" depending on what state it was in previously.
An example would be to press it on activating a high side mosfet that is directly connected to the positive side of the power supply. Then if you long press the same button triggers the microcontroller through software to control the volume of the radio for instance the longer you press or hold your finger on that button the
The louder or higher the amplitude or volume of music the radio will produce. It's called soft pots short for potentiometer or a digitally controlled volume knob. I have no class.
I mean Class is dismissed...