Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8082

Advanced users • Pi 5 PWR button as multi-function button?

$
0
0
Hello,

Looking to see if it is possible to configure the onboard power button to perform as a kind of "multi-function" button.

What I mean by this is I hope to use the PWR button ( both the physical button or through the onboard 2pin header ) to control some aspect of my custom developed app, single press to take a picture for example.

Then with a double press it should do shutdown and long press should do a force shutdown as it usually does.

I would want it to be robust enough that single press which would activate capturing a picture for example doesn't accidentally trigger shutdown.

What might an approach be to achieving this? To begin, how can I disable the PWR button performing shutdown on single press. What are the debounce and timeout values currently?

Statistics: Posted by cpdev — Tue Apr 29, 2025 11:25 pm



Viewing all articles
Browse latest Browse all 8082

Trending Articles