sendKey() without switching to Automagic Input Keyboard

Post your feature requets for new triggers, conditions, actions and other improvements.

Moderator: Martin

Locked
User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

sendKey() without switching to Automagic Input Keyboard

Post by Desmanto » 30 Apr 2019 06:27

Hi Martin,

I see tasker update has new action called Keyboard Action : https://www.youtube.com/watch?v=hmCOFd0tcNU

Current Automagic Control UI only can send keyboard key if Automagic input is used as default keyboard. Which mean I have to use action switch keyboard first (required root for UI-less switch), do the Control UI sendKey() and switch back the keyboard to default one. I wonder if the key can be sent now without the need to switch Automagic input first. The reason I don't use sendKey() so much is because the need to switch keyboard first. This add latency to the flow. (have to put some sleep there to make sure the switch is successful before continuing the script).

I use

Code: Select all

sleep(100);
sendKey("W", "CTRL_ON");
to close tab in Chrome. This flow takes at least 300 ms to finish, because I have to add the switch keyboard action before and after the Control UI (then i put toast message to measure the time, {getDate()-triggertime} ). Not a big delay, but I feel a bit stutter after closing the tab. Especially when I close multiple tab consecutively.

If it can send the key now without switching keyboard, then the flow will be much faster, less than 200 ms, almost no stutter, and can be used together with default keyboard while typing or inputing.

Regards,
Desmanto
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

anuraag
Posts: 371
Joined: 24 Jan 2015 02:06

Re: sendKey() without switching to Automagic Input Keyboard

Post by anuraag » 30 Apr 2019 07:26

Tasker itself switches keyboard (using secure setting) before doing those action. 5.7 added a keyboard like Automagic.

You can use secure setting action to switch keyboard on non rooted device.

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

Re: sendKey() without switching to Automagic Input Keyboard

Post by Desmanto » 30 Apr 2019 07:40

Oh, that means tasker will also suffer from the same delay then. I thought finally there is a way around it. :D
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Locked