Page 1 of 1

Need help with a trigger (Hold power button)

Posted: 28 Feb 2017 15:55
by Jkutkut
Good evening:

I'm working in a new flow and I need your help. What I basically need is a way to execute a flow when I hold press the power button. I saw the trigger "command" but I think that only works if you press the button (And I need to hold-press).
I have the 6.0.1 android version.

If somebody knows how to help me, I'll be very thankful.

Thanks

Jkutkut

Re: Need help with a trigger (Hold power button)

Posted: 28 Feb 2017 16:37
by bogdyro
This should work
Trigger command output
In 'command' field you should enter this:

while true;do getevent -l -c 1 /dev/input/event0;done
Matches glob *KEY_POWER*UP*
Event0 might be device dependent. You can watch the log to find out what's the right event by leaving an empty condition

Re: Need help with a trigger (Hold power button)

Posted: 01 Mar 2017 15:31
by Jkutkut
Thanks!! It works perfectly!
I changed the event number as you said and that's it.

Thanks again!

Jkutkut