Cannot change Windows 10/11 touch keyboard to Traditional Chinese phonetic layout

Bruce You 1 Reputation point
2024-08-07T12:55:51.2133333+00:00

I'm an author of a Traditional Chinese Input Method.

My IME works very well before Windows 10 Version 1703, but the screen keyboard always shows English layout instead of Chinese Phonetic (Bopomofo) layout after Windows 10 Version 1709.

The steps to reproduce this problem:

#define TEXTSERVICE_LANGID MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED)

to

#define TEXTSERVICE_LANGID MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL)

  • Open SampleIME.cpp, modify this:

*pwPreferredLayoutId = TKBL_OPT_SIMPLIFIED_CHINESE_PINYIN;

to

*pwPreferredLayoutId = TKBL_OPT_TRADITIONAL_CHINESE_PHONETIC;

  • Build this project.
  • Register COM by: regsvr32.exe Debug/SampleIME.dll
  • Run Notepad.exe, switch keyboard to "Sample IME", and click to show up the touch/screen keyboard.

Then it is only able to show English keyboard, but not Chinese Phonetic keyboard.

After doing some traces and debugs, it seems that system didn't use ITfFunctionProvider::GetFunction to query IID_ITfFnGetPreferredTouchKeyboardLayout and then have a chance to call its GetLayout method to change the touch-screen keyboard layout.

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,653 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.