Hello, I need some assistance, currently, I am using Keyman on my website. I want to use the keyboard only when the user focuses on the specific input with id=“multilingual” and not all input, how can I un-init keyboard keyman on other input and init keyboard on input with id=“multilingual”?
There are two steps to this.
Step 1: during initialization, set attachType
to "manual"
.
https://help.keyman.com/developer/engine/web/16.0/reference/core/init#init_options
When in manual
mode, KeymanWeb does not automatically connect to your page elements. Whereas auto
provides “opt out” behavior, manual
provides “opt in” behavior instead.
Step 2: “Opting in” / enabling a specific element
https://help.keyman.com/developer/engine/web/16.0/reference/core/attachToControl
Putting it together
So, for your case, your keyman.init
call should resemble the following…
keyman.init({
attachType: 'manual'
}).then(function() {
var multilingual = document.getElementById('multilingual');
keyman.attachToControl(multilingual);
});
Something like this should suffice.