how to initialise keyboard on kmw_btn_osk button click not on the focus of textarea
Thanks for re-posting here. Can you give a little more detail, because I’m not sure exactly what you mean by this?
Current scenario is that user click in textarea or text, keyboard layout button (i.e kmw_btn_osk) get enabled and then we can toggle virtual keyboard by clicking on this button.
If user do not clicked in textarea and click on kmw_osk_btn then nothing happen.
But my requirement is that without clicked in textarea user should be able to toggle virtual keyboard by click on kmw_osk_btn.
How to achieve this?.
Thanks in advance
In order to accomplish this, you need to tell Keyman which control the virtual keyboard is working with. The easiest way to do this is to focus() the control before toggling the visibility of the OSK. You would need to implement the kmw_btn_osk control yourself rather than using the standard KeymanWeb UI. You can see more on how to do this at https://help.keyman.com/developer/engine/web/10.0/guide/examples/manual-control and pages linked there.
I one of my projects that I am currently porting to teh KMW code, I have a wrapper that intialised keymanweb, the wysiwyg editor the project is using, webfonts and various typographic routines.
The setup is for a very multilingual environment. Use of KMW is controlled by user settings, so that in this case there would be no direct equivalent to kmw_btn_osk. If the user has enabled KMW option, it would be initiated when app is initiated.
There are many different ways to intigrate KMW into a project.