Tin huynh
Tin huynh

Reputation: 35

Turn on Ime-mode japanese in chrome

Is there a way to turn on IME-mode japanese when input in chrome . I know style

style="ime-mode:active" 

is not supported for chrome browser. Anyone have any other way for chrome ?

when the customer is Japanese, enter the input tag on chrome browser. then ime-mode in os will change the status to Japanese typing

Upvotes: 2

Views: 889

Answers (1)

Norio Yamamoto
Norio Yamamoto

Reputation: 1796

It can be done, but it takes time.

Write a Python program that turns on the IME and a Chrome extension that calls it using native messaging. And inject the Chrome extension into your Html.

Html

  <input id="text" type="text">

JavaScript

  document.getElementById("text").onfocus = () => {
    // Write the code that calls the Python program here.
  }

Python

import pywinauto

# The IME hotkey in this example is Ctrl+Space.
pywinauto.keyboard.send_keys('^{SPACE}')

Upvotes: 0

Related Questions