Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support MS-IME compatible "Don't use direct input mode" behavior in Mozc for Windows #817

Open
yukawa opened this issue Oct 14, 2023 · 0 comments

Comments

@yukawa
Copy link
Collaborator

yukawa commented Oct 14, 2023

Description

MS-IME team has been trying to effectively deprecate so-called "Direct input mode" for long time, no later than Microsoft Office IME 2007, with keeping it configurable with an option labeled "Don't use direct input mode" / 直接入力を使用しない / 直接入力モードを使用しない in their settings page.

As of Windows 11, this setting is enabled by default, and you can opt-out it if and only if you explicitly select "Use previous version of Microsoft IME" in their settings, meaning that a vast majority of Windows users are supposed to be using "Don't use direct input mode" enabled.

previous version of MS-IME Settings

Mozc for Windows, however, has always behaved as if "Don't use direct input mode" was disabled, mainly because that's the default behavior of MS-IME bundled with Windows XP.

The difference becomes quite obvious when an application is programmatically trying to change the IME mode to half-width alphanumeric. In such a scenario, MS-IME behaves as if it is disabled, while Mozc for Windows behaves as if it is enabled with half-width alphanumeric mode. This is basically why the following issue looks to be specific to Mozc / Google Japanese Input.

For better compatibility, let's update Mozc's behavior to be compatible with MS-IME even if such a behavior is to some extent conflicting with what the traditional IME APIs have been implying.

Steps to reproduce

  1. Install Mozc
  2. Open Notebook.
  3. Make sure that Mozc is selected
  4. Right click Mozc's mode icon in the task tray
  5. Click "Half-width Alphanumeric"
  6. Type "Mozc" (Shift + M, o, z, c)
  7. Change Mozc's input mode back to Hiragana mode.
  8. Type "Mozc" (Shift + M, o, z, c)

Expected behavior

  • At the step 3, Mozc's mode icon is
  • At the step 4, there is no "Direct input" mode.
  • After the step 5, Mozc's mode icon becomes
  • In the step 6, "Mozc" is typed without composition.
  • After the step 7, Mozc's mode icon is
  • In the step 8, Mozc's mode icon becomes

Actual behavior

  • At the step 3, Mozc's mode icon is
  • At the step 4, there is "Direct input" mode. (not expected)
  • After the step 5, Mozc's mode icon becomes (not expected)
  • In the step 6, the entered text "Mozc" remains to be composing state. (not expected)
  • After the step 7, Mozc's mode icon is
  • In the step 8, Mozc's mode icon becomes

Version or commit-id

6d80d75

Environment

  • OS: Windows 11 22H2
hiroyuki-komatsu pushed a commit that referenced this issue Oct 15, 2023
Mozc for Windows has been mapping IS_ALPHANUMERIC_HALFWIDTH InputScope
to "Halfwidth Alphanumeric Mode (IME On)" to be compatible with
Microsoft IME 2012.  However, recent versions of MS-IME map it to
"Direct Mode", probably to make it more consistent with their
default settings of "Don't use direct input mode" [1].

This discrepancy can result in unexpected user experiences when app
developers assume IS_ALPHANUMERIC_HALFWIDTH is a way to turn off IME
based on recent MS-IME's behavior [2].

Anyway, Mozc's design philosophy has been to emulate MS-IME's behavior
whenever possible.  Let's just update InputScope mapping to be
compatible with the latest version of MS-IME.

Closes #818.

 [1]: #817
 [2]: microsoft/terminal#14407

PiperOrigin-RevId: 573458610
coooooooozy pushed a commit to coooooooozy/mozc that referenced this issue Nov 26, 2023
Mozc for Windows has been mapping IS_ALPHANUMERIC_HALFWIDTH InputScope
to "Halfwidth Alphanumeric Mode (IME On)" to be compatible with
Microsoft IME 2012.  However, recent versions of MS-IME map it to
"Direct Mode", probably to make it more consistent with their
default settings of "Don't use direct input mode" [1].

This discrepancy can result in unexpected user experiences when app
developers assume IS_ALPHANUMERIC_HALFWIDTH is a way to turn off IME
based on recent MS-IME's behavior [2].

Anyway, Mozc's design philosophy has been to emulate MS-IME's behavior
whenever possible.  Let's just update InputScope mapping to be
compatible with the latest version of MS-IME.

Closes google#818.

 [1]: google#817
 [2]: microsoft/terminal#14407

PiperOrigin-RevId: 573458610
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant