trigger when keyboard pops up
Moderator: Martin
Re: trigger when keyboard pops up
Hi,
You can also try to use trigger UI Event to see if it responds in some way when the keyboard is opened.
I don't like to provide an official trigger in Automagic for functions that heavily rely on accessibility services to detect it since it is usually a support nightmare to keep such things working across different Android versions and on different devices (That's also the reason that there's no Google Now integration in Automagic).
Regards,
Martin
You can also try to use trigger UI Event to see if it responds in some way when the keyboard is opened.
I don't like to provide an official trigger in Automagic for functions that heavily rely on accessibility services to detect it since it is usually a support nightmare to keep such things working across different Android versions and on different devices (That's also the reason that there's no Google Now integration in Automagic).
Regards,
Martin
Re: trigger when keyboard pops up
Trigger UI Event with event Window opened and package name com.google.android.inputmethod.latin seems to work on my device. The package name depends on soft keyboard in use so you might have to search the proper value for your device (see action Init Variable System Setting, category Secure and name default_input_method, it should be the part of the value before the slash).
Regards,
Martin
Regards,
Martin
Re: trigger when keyboard pops up
Thanks a lot but that was a no go to me. I'm on lollipop 5.1.1. zte axon mini.
Does it work on your leaving the "contain text" empty?
Cheers
Does it work on your leaving the "contain text" empty?
Cheers
Re: trigger when keyboard pops up
Yes, it works when "contains text" is empty.
The same settings also don't work on a Samsung with Android 6...
The same settings also don't work on a Samsung with Android 6...
-
- Posts: 109
- Joined: 16 Apr 2014 04:57
Re: trigger when keyboard pops up
Hey MartinMartin wrote: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
This "Showing text keyboard" and "Keyboard hidden" stuff doesn't seem to work on Android N. Could you suggest what text should be entered in the 'Text contains' field in order to detect the showing up and hiding of the keyboard with regards to Nougat?
Re: trigger when keyboard pops up
How to perform action qhen window is closed?Martin wrote:Trigger UI Event with event Window opened and package name com.google.android.inputmethod.latin seems to work on my device. The package name depends on soft keyboard in use so you might have to search the proper value for your device (see action Init Variable System Setting, category Secure and name default_input_method, it should be the part of the value before the slash).
Regards,
Martin
Re: trigger when keyboard pops up
Hi,
You could try to use trigger UI Event to trigger on all Window opened events of all packages (set package name to *). You probably have to use a condition Expression to check some of the provided variables to see if it's the keyboard or any other window, which indicates that the keyboard was closed.
Regards,
Martin
You could try to use trigger UI Event to trigger on all Window opened events of all packages (set package name to *). You probably have to use a condition Expression to check some of the provided variables to see if it's the keyboard or any other window, which indicates that the keyboard was closed.
Regards,
Martin
Re: trigger when keyboard pops up
Isn't that will drain battery much as flow will trigger every second?
Can you add somthing like this? I don't want to purchase another app for this.
https://plus.google.com/+JoãoDias/posts/SxZe7Crq5Mr
Can you add somthing like this? I don't want to purchase another app for this.
https://plus.google.com/+JoãoDias/posts/SxZe7Crq5Mr
Re: trigger when keyboard pops up
It should not consume that much battery since your device and CPU are active anyway when you are typing stuff.
There already exists an event type Component focused in trigger UI Event which could be used to detect some of the events you are interested in. Detecting focus lost could be more difficult. I'll add it to the todo list to check how this can be done. Maybe you could detect it by checking that variable source_class_name is not android.widget.EditText.
Regards,
Martin
There already exists an event type Component focused in trigger UI Event which could be used to detect some of the events you are interested in. Detecting focus lost could be more difficult. I'll add it to the todo list to check how this can be done. Maybe you could detect it by checking that variable source_class_name is not android.widget.EditText.
Regards,
Martin
Re: trigger when keyboard pops up
Martin, just so you know the new trigger hardware keyboard open or type do nothing on my phone. I have exaustivelly tested. nevertheless I really appreciate you haven't forgotten users were asking for this.
Im on android marshmallow 6.0.1 on a zte axon mini model b2016 but with a modified ROM meant for the model b2015 (non force touch). I know zte tweaks their OS and sometimes they interfere with normal features or even break them.
Im on android marshmallow 6.0.1 on a zte axon mini model b2016 but with a modified ROM meant for the model b2015 (non force touch). I know zte tweaks their OS and sometimes they interfere with normal features or even break them.