Skip to content

adds no_english_mode #1

Merged
alex3236 merged 3 commits intoalex3236:masterfrom
MsRCAtN:no_en
Mar 27, 2026
Merged

adds no_english_mode #1
alex3236 merged 3 commits intoalex3236:masterfrom
MsRCAtN:no_en

Conversation

@MsRCAtN
Copy link
Copy Markdown
Contributor

@MsRCAtN MsRCAtN commented Mar 23, 2026

Adds No English Mode, some impls from https://github.com/mbbill/no_english_mode

Add no_en as a config option and --no-en <enable|disable> as a CLI entry, enabled by default.
Add a focus hook to handle window/control focus changes.
Add a mouse-up fallback to cover cases where Windows switches back to English without a clear focus event.
Add simple request coalescing and foreground-window checks to reduce stale or incorrect IME switching, especially around Alt+Tab.

No significant performance impact or potential bugs have been confirmed yet.

@alex3236
Copy link
Copy Markdown
Owner

alex3236 commented Mar 25, 2026

Thanks for your contribution! Looks good to me.

However I suggest not adding the --no-en arg, still let users modify the config file and reload the running instance via -r.

The reason is, other configuration items do not have such command.
And if you want to implement that, consider --config <item> <value> instead of --<item> <action>.
For example, --config tap_shortcut LWIN SPACE.

The --startup flag appears to be an outlier, but it's actually an operation/action, not a config item, hence its dedicated command.

@MsRCAtN
Copy link
Copy Markdown
Contributor Author

MsRCAtN commented Mar 26, 2026

Ok so you want to remove --no-en arg but keeping editing config if I understand correctly.

In my opinion this option is aggresive and may cause breaks or malfunctions in some applications, depends on app runtimes, focus capturing method even Windows version. You can have a try on a virtualize machine or a remote desktop with agent which usually contained keyboard/mouse key escaping and you will know my concerning immediately.

In this case the option could provide a single shot while starting so you dont need to edit and reload config, simple but working.

I would like to provide a commit to apply the change if you keep your ideas still.

@alex3236
Copy link
Copy Markdown
Owner

I'm not quite following you cuz the --no-en option you provided writes to the config and reloads the instance, meaning it stays in effect after it stops running, so it can't really be considered a one-shot attempt.

@MsRCAtN
Copy link
Copy Markdown
Contributor Author

MsRCAtN commented Mar 26, 2026

Noted. Which proposal you prefer:

  1. no-en Mode enabled by default, using an option( a switcher, to be clear) to disable no-en Mode while starting an instance. Do not write it into config.toml.
  2. Remove no-en arg, no-en Mode disabled by default, only be actived by config.toml explicitly as you mentioned.

@alex3236
Copy link
Copy Markdown
Owner

I'd suggest picking one of these two options you prefer:

  • no_en enabled by default, --no-en not provided; before creating config.toml on the first launch, use MessageBoxW to pop up a alert, guiding users to try turning no_en off if they run into issues.
  • no_en disabled by default, --no-en not provided.

@alex3236 alex3236 merged commit 2ba1e76 into alex3236:master Mar 27, 2026
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants