A button and slider at same digital pin on Adafruit ESP8266

What I have: Blynk, Adafruit Feather Huzzah ESP8266.

What I need: Use Slider and Botton to control a same digital pin.

I am working on a project and I need the PWM signal from the slider to do a dimming function. Meanwhile I need the ON/OFF to do a switch function. I am using a specific digital port, ex. GP15 and this pin on the ESP8266 is tied to my main driver. I can’t do them both because once this specific port is token, I can only control one of these two functions, either ON/OFF or PWM. Is there any other way in the codes wise that I can control both of these two functions together and I only have to connect to a exact same digital pin?

Study virtual pins in the docs, they can control thousands of physical pins if you have that many.

And use the search function in this web page… i.e “button slider led” shows a few threads, including this one…

It is not exactly what you are looking for, examples rarely are… so study it and tweak it to your needs.