trigger when keyboard pops up

Post your questions and help other users.

Moderator: Martin

LED
Posts: 45
Joined: 28 Jun 2014 00:51

trigger when keyboard pops up

Post by LED » 27 Apr 2016 09:36

Hi Martin,

I didn't yet figure out how to achieve this, but is there a way to trigger a flow when the keyboard shows up?
And also when the keyboard closes (automatically or manually)
I'm now on lollipop 5.1.1.

Thanks

LED

LED
Posts: 45
Joined: 28 Jun 2014 00:51

Re: trigger when keyboard pops up

Post by LED » 28 Apr 2016 12:25

Any Ideas about how the keyboard could trigger a flow?

I have built a quite cool set of flows but If I can't trigger them they are pretty pointless really.

Thanks

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: trigger when keyboard pops up

Post by Martin » 28 Apr 2016 18:27

To my knowledge there's no good way to detect when the keyboard becomes visible. You could try to see if trigger UI Event works.
When using the google keyboard, following settings could work:
Event type: Window opened
Package Name: com.google.android.inputmethod.latin
Text contains text: Showing text keyboard

respectively to detect when the keyboard is closed
Text contains text: Keyboard hidden

This method will probably not be very reliable.

Regards,
Martin

LED
Posts: 45
Joined: 28 Jun 2014 00:51

Re: trigger when keyboard pops up

Post by LED » 29 Apr 2016 08:25

thanks a lot Martin.

you know, it actually works, always and reliably on my phone.

For this to work, however, I only had to use these single words.

Text contains text: Showing
Text contains text: hidden

Thanks for the help, I'll try to post my little flows shortly then.

LED

LED
Posts: 45
Joined: 28 Jun 2014 00:51

Re: trigger when keyboard pops up

Post by LED » 29 Apr 2016 16:47

Sorry Martin but a have one more thing to ask if you don't mind.

If I click on a text field the keyboard pops up, then my flow is triggered which then simply shows a small widget overlay.

If I click on the overlay it shows me a default system list, with many pre-defined sentences on each row.

Currently if I click on a row my flow is simply copying it to the clipboard. I then have to long click on the text box and paste it. Question:

Is there a way for me to click/choose the sentence I'd like to bring to the text box and it is automatically pasted into the text field I was currently focused on?

I mean: I click and focus on a text field, click on the overlay to show my list, then once a value is chosen it lands automatically in the text field.

I hope I'm being clear.

Thanks once again.

LED

LED
Posts: 45
Joined: 28 Jun 2014 00:51

Re: trigger when keyboard pops up

Post by LED » 29 Apr 2016 23:31

Hi Martin. Please ignore my last question. I got it after reading your forum a bit further and using the control UI "sendtext" command.
Automatic is simply ridiculously powerful.

Thanks

LED

LED
Posts: 45
Joined: 28 Jun 2014 00:51

Re: trigger when keyboard pops up

Post by LED » 08 Jun 2016 12:03

Hi Martin,
I had this issue sorted before with your help, but now, after installing the latest version of Google keyboard, the trigger UI event cannot detect when the keyboard shows up anymore.

Google has certainly done something that makes it more difficult to detect when it's keyboard shows/hide.

Would you have any suggestions on how I can detect and trigger a flow when the keyboard show/hide.

Thanks a lot

LED

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: trigger when keyboard pops up

Post by Martin » 08 Jun 2016 19:30

Hi,

No sorry, I'm not aware about any other good way to detect this.
Older ROMs used to have a way to show a notification for the keyboard switcher when the keyboard was opened. Unfortunately newer versions of Android don't have this feature anymore.

Regards,
Martin

bogdyro
Posts: 241
Joined: 04 Apr 2015 15:14

Re: trigger when keyboard pops up

Post by bogdyro » 09 Jun 2016 06:13

Hi. Well, on my note 5, 6.0.1 rom it still shows a pop-up select keyboard. So trigger notification on status bar works. Process Android system and content title = Select keyboard

LED
Posts: 45
Joined: 28 Jun 2014 00:51

Re: trigger when keyboard pops up

Post by LED » 26 Sep 2016 13:45

Hi Martin,
The first time I asked this question was long ago. You have since found a workaround which worked for sometime but I then reported no method to "listen" for the keyboard usage worked anymore, maybe due to a google keyboard update.

However I have since looked for apps that do similar function and found that plenty of "clipboard managers" use accessibility rights to be able to detect the keyboard is open.

Automagic already has accessibility right for reading the notifications, wouldn't it be possible for you to also make automagic detect the keyboard?
It would be amazing to have the "keyboard open" trigger in the future.

Regards

LED

Post Reply