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

IME mode changed at startup in Google Japanese Input #14407

Open
Tracked by #6999
kzrnm opened this issue Nov 18, 2022 · 10 comments
Open
Tracked by #6999

IME mode changed at startup in Google Japanese Input #14407

kzrnm opened this issue Nov 18, 2022 · 10 comments
Labels
Area-i18n Internationalization issues (e.g.: non-US input handling doesn't work) Help Wanted We encourage anyone to jump in on these. Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal.
Milestone

Comments

@kzrnm
Copy link

kzrnm commented Nov 18, 2022

Windows Terminal version

1.15.2874.0

Windows build number

10.0.19045.0

Other Software

Google 日本語入力 (2.28.4650.0)

Steps to reproduce

Start Windows Terminal with Japanese IME.

Expected Behavior

Google IME selects 直接入力(Direct input) mode.
MS IME selects 半角英数字/直接入力(Direct input) mode.

Actual Behavior

Google IME selects 半角英数(English input with IME) mode.
MS IME selects 半角英数字/直接入力(Direct input) mode.

@kzrnm kzrnm added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Nov 18, 2022
@weiqi-chen
Copy link

weiqi-chen commented Nov 20, 2022

Not only Japanese, but also Chinese.

issue

@lhecker lhecker added Product-Terminal The new Windows Terminal. Area-i18n Internationalization issues (e.g.: non-US input handling doesn't work) labels Nov 21, 2022
@yonta
Copy link

yonta commented Nov 22, 2022

Same issue is reported at Gborad Help.
https://support.google.com/gboard/thread/180438722/windows-terminal-%E8%B5%B7%E5%8B%95%E6%99%82%E3%81%AE-%E5%85%A5%E5%8A%9B%E6%96%B9%E6%B3%95-%E3%81%AB%E9%96%A2%E3%81%99%E3%82%8B%E4%B8%8D%E5%85%B7%E5%90%88?hl=ja

Expert says that Microsft IME has one state "半角英数字/直接入力" (direct input) but Google Japanese Input and Legacy Microsoft IME has "半角英数" (English input) and "直接入力" (direct input) as separated state.

補足情報として
現行の Microsoft IME は機能が少なく「半角英数字/直接入力」が一つの状態となっています。
Google 日本語入力や、以前のバージョンの Microsoft IME においては、「半角英数」「直接入力」が別の状態として存在しています。

I think Windows Terminal incorrectly specifies input method at startup.

@cumet04
Copy link

cumet04 commented Dec 26, 2022

I have same issue, and v1.14.186 reproduces the issue but v1.13.1143 doesn't.

@carlos-zamora carlos-zamora added Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Help Wanted We encourage anyone to jump in on these. and removed Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jan 25, 2023
@msftbot msftbot bot added the Needs-Tag-Fix Doesn't match tag requirements label Jan 25, 2023
@carlos-zamora carlos-zamora added this to the Backlog milestone Jan 25, 2023
@carlos-zamora carlos-zamora removed the Needs-Tag-Fix Doesn't match tag requirements label Jan 25, 2023
@msftbot msftbot bot added the Needs-Tag-Fix Doesn't match tag requirements label Jan 25, 2023
@carlos-zamora
Copy link
Member

Marking this as a feature. We've had reports in the past of users wanting this kind of behavior. Sounds like the right path forward is to make this a configurable setting.

@siketyan
Copy link

siketyan commented Feb 1, 2023

@carlos-zamora
For clarification, does the user really want to switch to alphanumeric input mode (with IME ON: this is usually not useful in terminals)? I can not imagine why they want the behaviour. I think almost all users of terminals want direct input with IME OFF, not alphanumeric input mode.

If there are some usecases that users want to switch to that mode, I think it is the right way to make it configurable too.

@usagi
Copy link

usagi commented May 25, 2023

The cause appears to be #13028. In this PR, it is declared that

This change should have no negative impact.

and

If there's any reason to have to keep the Text inputScope, maybe making this setting customizable via settings.json would be a good idea, but I don't see the need to do this, AlphanumericHalfWidth is perfect.

However, as this issue shows, this feature can have extremely unpleasant side effects depending on the environment. As @carlos-zamora suggests, I strongly agree that there is a need to add settings that allow users to easily switch this feature ON/OFF.

@ikeyan
Copy link

ikeyan commented Jun 7, 2023

Original issue #12731 says:

Personally I just want Windows Terminal to have English input mode on startup like what conhost does, so I can type in commands immediately.

So the author expected that users could immediately start typing commands at startup, but this is hampered by this issue.

@weiqi-chen
Copy link

Original issue #12731 says:

Personally I just want Windows Terminal to have English input mode on startup like what conhost does, so I can type in commands immediately.

So the author expected that users could immediately start typing commands at startup, but this is hampered by this issue.

I add two keyboard layout, one is english, another one is chinese. If I need to input english / chinese, I use Alt + Shift to switch the keyboard。 When I fell like to use Chinese keyboard to type english and chinese, I would use Shift key to enable/disable Chinese Pinyin. I don't like it that Windows Terminal do it(switch to english) every single time after I pressing Enter key, even I don't need to switch to english.

@siketyan
Copy link

siketyan commented Jun 8, 2023

I now think this can be considered as Google IME's issue.
In #13028, it is added to change CoreTextInputScope once Windows Terminal is loaded.
The InputScope does not mean IME should be turned on or off on the text input, so the decision is delegated to IMEs.

In Microsoft IME, CoreTextInputScope::AlphanumericHalfWidth is mapped to Direct Input mode, so it is okay for us.

But in Google IME or Mozc, the scope is mapped to Alphanumeric mode with IME on, causing this issue. It is documented in Mozc repository:
https://github.com/google/mozc/blob/master/docs/design_doc/input_scope.md

Quote:

InputScope Expected Input Mode
IS_URL, IS_EMAIL_USERNAME, IS_EMAIL_SMTPEMAILADDRESS, IS_DIGITS, IS_NUMBER, IS_PASSWORD, IS_TELEPHONE_FULLTELEPHONENUMBER, IS_TELEPHONE_COUNTRYCODE, IS_TELEPHONE_AREACODE, IS_TELEPHONE_LOCALNUMBER, IS_TIME_FULLTIME, IS_TIME_HOUR, IS_TIME_MINORSEC Direct Mode (IME Off)
IS_ALPHANUMERIC_HALFWIDTH Halfwidth Alphanumeric Mode (IME On)

As described above, Google IME and Mozc consider IME should be turned on in text inputs with AlphanumericHalfWidth scope.

I am not familier with UWP, but isn't there a way to turn IME off without depending on the InputScope?

hiroyuki-komatsu pushed a commit to google/mozc 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
ncaq added a commit to ncaq/dotfiles that referenced this issue Nov 16, 2023
[IME mode changed at startup in Google Japanese Input · microsoft/terminal](microsoft/terminal#14407)
という問題が存在しており、
[ターミナルとIMEについてのログ · cumet04/dotfiles](cumet04/dotfiles#17)
を参考にひらがな切り替えのショートカットを追加することで誤魔化しを考える。
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
Area-i18n Internationalization issues (e.g.: non-US input handling doesn't work) Help Wanted We encourage anyone to jump in on these. Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

10 participants