I would like to have a trigger on an app like Macrodroid (or any other similar app) that listens to whether or not the Keyboard is active (Specifically, Google Keyboard).

Is there any way to do this?


2 Answers 2


Android does not provide an API to check whether the soft keyboard is visible or not. A soft keyboard may not even display anything. An unreliable hack often used is to check for changes in height of the Activity, where the visible soft keyboard will reduce it.

However it is possible to checking if an hardware keyboard is visible, Automate has a block for it.


You can use "UI element focused" in "UI actions" in AutoInput plugin. It not exactly what you want but it's best alternative AFAIK

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .