Page 1 of 1

Hardware Key Event Boolean AND

Posted: 20 Jun 2020 02:53
by vertigo
Currently, the hardware key event trigger operates as an OR, so setting it to trigger with vol up/down causes the flow to trigger when either key is pressed. I would like to be able to make a flow trigger only when both keys are pressed.

Re: Hardware Key Event Boolean AND

Posted: 05 Jul 2020 18:54
by Desmanto
AFAIR, there are changes in 1.38 which allow this, but can't be sure. Other way to do it is to use condition execution count with very short timed, example 200 ms.
Hardware key AND.png
Hardware key AND.png (32.84 KiB) Viewed 26720 times

Re: Hardware Key Event Boolean AND

Posted: 08 Jul 2020 18:08
by vertigo
Thanks! Hopefully you're right and it is added in the new version, which would greatly simplify things, though I suppose it's something that'll only be used once. Anyway, your setup got me on the right track, and I just made a minor modification to make it work better. I added a 2x in 500ms execution count after each key code condition before combining into the 2x count after them. That way, pressing the same volume button twice really fast, as might happen when adjusting the volume, won't trigger it.