Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how do you use IME?

I want to make a control that handles user input, so I want to be able to handle different keyboards, and one of the ways is using IME.

If you don't handle it, there is a floating window that appears when you have IME active (for example japanese writing active). I found the messages that needs to be taken care of, but I don't know how to send the keys I'm trapping to the IME and when do I get a valid converted char.

like image 818
CiNN Avatar asked Jan 11 '09 23:01

CiNN


People also ask

How do you use the IME on the keyboard?

First, click on the start button in the bottom left-hand corner and open “Settings”. Second, navigate to “Time & language” and click to go into that. Next, open “Region & language” and select the “Add a language” button listed under Languages. Select “日本語 – Japanese” and voila!

How does Japanese IME work?

IME has a dictionary in order to convert from Hiragana into Kanji. We type a word or sentence in Hiragana and IME converts it into Kanji acording to its dictionary. Hiragana is a phonogram, but Kanji character has a meaning. So, there are many words which has the same reading but different meaning.

How do I set up IME?

Find IME settings in Windows 10Select Start , then select Settings > Time & language > Language. Scroll down and select Japanese > Options. Scroll down and select Microsoft IME, then select Options.

What is IME app used for?

An input method editor (IME) is a user control that enables users to enter text. Android provides an extensible input-method framework that allows applications to provide users alternative input methods, such as on-screen keyboards or even speech input.


1 Answers

I'm a Microsoft SDE that used to maintain the (Windows and Office) Korean IME for a while...

Unfortunately the best IME API documentation is provided by non-Microsoft sites:

  • IME programming sample (very well commented code!) from Google's Chrome browser
    • ime_input.h
    • ime_input.cc
  • Win32 Multilingual IME Overview for IME Development (Archived)
  • Win32 Multilingual IME Application Programming Interface (Archived)
    (To Microsoft's credit, these last two used to be part of the Windows Driver Development Kit)

Here is the official Microsoft documentation: Input Method Manager (MSDN)

There is also a new, more advanced IME based on the Text Services Framework (TSF) that Microsoft would prefer you to use, but it's even more complicated and the old API is emulated pretty well. If you don't need any of the advanced features (like input via tablet/voice recognition/fancier IME/etc) then using the old API is sufficient.

The best documentation on the Text Services Framework is the TSF Aware Blog written by another Microsoft dev. Eric Brown may even personally answer your questions if you go this route.

Here is the official Microsoft documentation for TSF: Text Services Framework (MSDN)

One feature of TSF you may find useful is the ability to suppress rendering of the IME (needed for full screen games that need to render the IME themselves, for example). Simply tell TSF that your app will render the IME GUI, then implement an empty rendering method: UILess Mode Overview (MSDN)

like image 118
Leftium Avatar answered Oct 11 '22 13:10

Leftium