Page 1 of 1

Trigger: Physical keyboard opened/closed

Posted: 17 Mar 2016 23:17
by mbirth
I just wanted to move a simple task from Tasker to Automagic:

Trigger: Physical keyboard has been closed
Task: Show a toast message (more actions later)

But there seems to be no condition for the physical keyboard (e.g. on a Blackberry PRIV). Could this be added, please?

Re: Condition: Physical keyboard opened/closed

Posted: 18 Mar 2016 19:24
by MURTUMA
If your phone is rooted, you could check from the logs if there's relevant event.

Re: Trigger: Physical keyboard opened/closed

Posted: 20 Mar 2016 00:11
by mbirth
The BlackBerry can't be rooted. Tasker and Automate have a native trigger for that, so there seems to be some way to catch that.

EDIT: Here's a page from BlackBerry about how to detect physical keyboard in Android: http://devblog.blackberry.com/2015/11/r ... rd-part-1/

Re: Trigger: Physical keyboard opened/closed

Posted: 28 Sep 2016 12:41
by mbirth
Any progress here?

The Android way is described here and uses onConfigurationChanged and the Configuration object. It doesn't look that complicated.

Re: Trigger: Physical keyboard opened/closed

Posted: 28 Sep 2016 19:31
by Martin
Thanks for the links! This should be quite straight forward to add. I'll add it to the todo-list.
Would be great if you could test if it's working properly on your device once it's implemented since I don't have any device with a hardware keyboard anymore.

Regards,
Martin

Re: Trigger: Physical keyboard opened/closed

Posted: 28 Sep 2016 19:36
by mbirth
Martin wrote:Would be great if you could test if it's working properly on your device once it's implemented since I don't have any device with a hardware keyboard anymore.
Of course! :) Thank you!

Re: Trigger: Physical keyboard opened/closed

Posted: 07 Nov 2016 21:51
by mbirth
Tested it in the current EAP version and it seems to work fine on my BlackBerry PRIV.

One suggestion: You could supply the keyboard_type variable in the opened/closed condition already so I don't have to figure it out using the condition later. Maybe even make opened/closed checkboxes (in the trigger) and set a variable keyboard_state to "open" or "closed" depending on the state (or let the script figure it out with the state condition).