This feature may be a candidate for removal from web standards or browsers. You should not modify the state of input method editor. Instead, you should use hints (such as a lang or inputmode attribute) to help the browser select the right user interface for text input.