Page 1 of 1

sendKey() without switching to Automagic Input Keyboard

Posted: 30 Apr 2019 06:27
by Desmanto
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

Re: sendKey() without switching to Automagic Input Keyboard

Posted: 30 Apr 2019 07:26
by anuraag
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.

Re: sendKey() without switching to Automagic Input Keyboard

Posted: 30 Apr 2019 07:40
by Desmanto
Oh, that means tasker will also suffer from the same delay then. I thought finally there is a way around it. :D