Page 1 of 1

Hardware Key control

Posted: 08 May 2018 13:46
by regissg
I was using Tasker and I am switching to Automagic with great pleasure.

I have however not find how to control the hardware keys (Home, Back, Volume...) as I am able to do it with Tasker and Autoinput.

My need is for a Kiosk mode like app where I want to disable most hardware keys (volume, back, App switch) and use the Home key to go back to the Home page of my "Kiosk" app. Is that possible with Automagic without a rooted version of android?

Re: Hardware Key control

Posted: 08 May 2018 15:25
by Desmanto
Yeah, the hardware keys feature has been requested several times, but probably Martin hasn't found the time to implement it yet (being busy with accessibility).

For mean time, you can still use plugin Autoinput in Automagic. Use Trigger Plugin or Plugin (event). Autoinput hardware keys should be in Plugin (event). You can do exactly the same that you have done in tasker. (without root)

Just FYI though, most of other AutoInput action can be found already as built-in function in Automagic. Yeah, hardware keys is one the missing one in Automagic. But for something like Control UI, you can already use what Automagic has provided. You can look at my index, Control UI section for more detail.

Re: Hardware Key control

Posted: 08 May 2018 17:59
by regissg
Thanks Deamanto, I will test the plugin and great job for your detailed tutorials.

One reaon that I switched from tasker to Automagic is that I have noticed that Tasker+Autoinput was somehow impacting the reactivness of my webapp on a tablet. Especially for the "tap" that were missed on too many occasion.

Have you noticed such problem and do you know if Automagic provides an improvement on the matter?

Re: Hardware Key control

Posted: 08 May 2018 18:21
by Desmanto
I am ex-tasker user too, and had tried autoinput too. Control UI in Automagic is more superior in terms of clicking/accessing element. Well, it lacks something too (list element selection), but the perfomance outweigh it. Control UI script can run as fast as 10-20 ms per action, but using autoinput, I usually need at least 200-300 ms to make the action perfomed successfully. Because Control UI is script, we can create loop to wait for certain element before performing the action. So we will never miss it even though when the UI lags, it will still wait until it finish loading.

There is no way I will return back to tasker+autoinput combination. But If I really need that hardware keys event, maybe I will use Autoinput and enable it only when needed. Too many accessibility services running certainly will impact the overall UI perfomance. That's why I only have automagic accessibility enabled in my device. We can enable/disable Autoinput accessibility feature using set system setting, no root needed, but automagic need to be granted Write secure permission using adb on PC.