Hardware Key control

General discussions about Automagic and automation in general

Moderator: Martin

Post Reply
User avatar
regissg
Posts: 22
Joined: 23 Apr 2018 13:13

Hardware Key control

Post by regissg » 08 May 2018 13:46

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?

User avatar
Desmanto
Posts: 1938
Joined: 21 Jul 2017 17:50

Re: Hardware Key control

Post by Desmanto » 08 May 2018 15:25

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.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), Resurrection Remix Official 7.0.2 20190714, Pie 9.0, Rooted.

User avatar
regissg
Posts: 22
Joined: 23 Apr 2018 13:13

Re: Hardware Key control

Post by regissg » 08 May 2018 17:59

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?

User avatar
Desmanto
Posts: 1938
Joined: 21 Jul 2017 17:50

Re: Hardware Key control

Post by Desmanto » 08 May 2018 18:21

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.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), Resurrection Remix Official 7.0.2 20190714, Pie 9.0, Rooted.

Post Reply