Skip to content

How to detect mobile keyboard active status? #17

@NDark

Description

@NDark

Hi all,

Thanks for this plugin, that Unity not provides parameters to modify mobile keyboard on Android. Good job.

So far I can force to de-active mobile keyboard by using SetFocus(false) to specified NativeEditBox, but currently I can't find a way to detect when mobile keyboard of this plugin is active or not.

I've tried the method SetFocus(...) , but it seems when mobile keyboard was shown, this method will not be called.

( As Unity InputField, I can use TouchScreenKeyboard.visible to detect this signal. )

The scenario I need is

  1. User press the inputfield at the buttom part of Canvas, the app will move the specified GUI panel up , to show Inputfield in a proper place.
  2. As user press "Done"(right bottom) , "Close keyboard"(right up function panel at the top of mobile keyboard) , or "other place" above mobile keyboard, app will close mobile keyboard and move panel back to normal.

So the way I think to do this is to
a) To detect the status of current mobile keyboard of plugin outside as TouchScreenKeyboard.visible did .
b) To catch the message from and to plugin, and to call my function.

Any suggestion?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions