Tasker detect power button

43 views
Skip to first unread message

Duck Redbeard

unread,
Nov 28, 2017, 10:52:23 AM11/28/17
to Tasker
I am trying to capture my power button presses as events. I have tried autoinput and a few other things. What can I use to capture the power button's use?

Jimmy Jimmy

unread,
Dec 1, 2017, 10:02:44 PM12/1/17
to Tasker
Not directly. If you are rooted, you can detect screen off and run a logcat command to see if the power key was pressed.

Duck Redbeard

unread,
Dec 2, 2017, 5:17:08 AM12/2/17
to Tasker
That would work for me. I just don't know how to do that.

Jimmy Jimmy

unread,
Dec 2, 2017, 9:51:24 AM12/2/17
to Tasker
please take a look here:

https://groups.google.com/forum/m/#!search/power_sleep_requested/tasker/wy4YtB_nrjQ

On my device, I had to change the brief option to long because brief gave me exact results for both power key pressed and normal display timed out. So, explore to see which option works for you.

Jimmy Jimmy

unread,
Dec 2, 2017, 10:02:24 AM12/2/17
to Tasker
search power_sleep_requested and you will find a few posts on this subject
Reply all
Reply to author
Forward
0 new messages