keyman.setDefaultKeyboardForControl(Pelem, keyboard, languageCode); function is not working with iframe element

33 views Asked by At

It is showing warning that 'keymanweb.setKeyboardForControl' cannot set keyboard on iframes. I want to manually set specific language of keyman on iframe element. Please help me out to achieve the same.

1

There are 1 answers

0
Marc Durdin On

While keymanweb.setKeyboardForControl cannot be used with iframes, you should be able to use a controlfocused event event to select a keyboard on entry to the control:

keyman.addEventListener('controlfocused', function(eventProperties) {
  if(eventProperties.target == myIframe) {
    keyman.setActiveKeyboard(...);
  }
  return true;
});