Windows-Auto-Night-Mode icon indicating copy to clipboard operation
Windows-Auto-Night-Mode copied to clipboard

Auto night mode in windows IME.

Open JamYiz opened this issue 2 years ago • 10 comments

Describe the enhancement or feature you'd like

Win11 can change the input method theme, maybe automatically switch dark mode Describe alternatives you've considered

Additional context Add any other context or screenshots about the feature request here.

JamYiz avatar Apr 26 '22 16:04 JamYiz

I'm not quite sure what you are referring to. If some elements don't switch correctly, please try the latest beta.

If it still doesn't work, please check if it is related to this https://github.com/AutoDarkMode/Windows-Auto-Night-Mode/issues/424

Spiritreader avatar May 23 '22 12:05 Spiritreader

I might know how to solve this.

I'm using Windows 11 version 22621.169, in the personalization settings, there are many themes for the IME, like the ones in the screenshot: image (sorry if the Chinese UI is confusing)

The default behaviour is to automatically switch between light and dark upon theme change, but if we manually select one of them, then Windows will not change it anymore even if system color theme changes, and there is obviously no way to undo this on the UI.

So I dig a little deeper into this, and found that this setting is stored at HKEY_CURRENT_USER\Software\Microsoft\TabletTip\1.7 in the registry. To restore the default behavior, which is to switch IME theme automatically, you just need to delete this entry manually.

JingBh avatar Jul 11 '22 08:07 JingBh

Also a friendly Chinese version for the author @JamYiz : 我今天也遇到这个问题了,研究了一下发现应该是 Windows 的 bug,在注册表里删掉 HKEY_CURRENT_USER\Software\Microsoft\TabletTip\1.7 就能自动切换啦~

JingBh avatar Jul 11 '22 08:07 JingBh

I might know how to solve this.

I'm using Windows 11 version 22621.169, in the personalization settings, there are many themes for the IME, like the ones in the screenshot: image (sorry if the Chinese UI is confusing)

The default behaviour is to automatically switch between light and dark upon theme change, but if we manually select one of them, then Windows will not change it anymore even if system color theme changes, and there is obviously no way to undo this on the UI.

So I dig a little deeper into this, and found that this setting is stored at HKEY_CURRENT_USER\Software\Microsoft\TabletTip\1.7 in the registry. To restore the default behavior, which is to switch IME theme automatically, you just need to delete this entry manually.

So essentially the IME color can be changed by modifying a registry key? Does the keyboard has to be re-opened or do the changes made to the regkey take effect immediately?

Spiritreader avatar Jul 11 '22 12:07 Spiritreader

@Spiritreader

So essentially the IME color can be changed by modifying a registry key?

No it's not a single key, but a quite complex structure. image Inside SelectedThemeDark and SelectedThemeLight is something like this: image

So I actually don't know which key effects what. All I managed to figure out is that deleting the whole folder restores the default behavior.

btw I'm also not sure if this is the only place where Windows places the IME theme settings.

Does the keyboard has to be re-opened or do the changes made to the regkey take effect immediately?

From what I can tell:

  1. Making changes in the settings app takes effect immediately. So I guess making changes directly to the registry also takes effect immediately.

  2. If we delete the whole folder like mentioned above, the theme setting won't work anymore until the computer restarts, during which the IME theme will always be synced with the system theme no matter what you choose in the settings app.

JingBh avatar Jul 11 '22 13:07 JingBh

Making changes in the settings app takes effect immediately. So I guess making changes directly to the registry also takes effect immediately.

There is sadly an asymmetry with this behavior starting with Windows 11. Microsoft has introduced new unpublished APIs that are invoked in the control panel, but aren't availalbe to us, which caused (and causes) huge headaches in making even the theme switch work correctly in Win 11. Simultaneously the new UI they write doesn't seem to respond well to registry changes anymore.

If we delete the whole folder like mentioned above, the theme setting won't work anymore until the computer restarts, during which the IME theme will always be synced with the system theme no matter what you choose in the settings app.

If deleting the folder causes the IME themes to break until restart, I think it's a nonviable solution to integrate into auto dark mode for now. At least it's not stored as binary like the night light settings...

Thanks for investigating this tho, we'll monitor it and hopefully at some point there's a way to integrate this seamlessly

Spiritreader avatar Jul 11 '22 13:07 Spiritreader

Anyway I don't think Auto Dark Mode needs this feature, as the default behavior of the IME is to sync with system theme, which is exactly how this is expected to be. For now, as long as you don't touch the setting, it's fine, and hopefully Microsoft comes up with a "Follow system theme" option.

JingBh avatar Jul 11 '22 13:07 JingBh

Did Microsoft really just removed "follow system theme" for keyboard, emoji panel and IME? It was there in Windows 11 relesae version... image

Armin2208 avatar Jul 17 '22 22:07 Armin2208

thanks for providing the registry keys. we can fix this.

Armin2208 avatar Jul 17 '22 22:07 Armin2208

Did Microsoft really just removed "follow system theme" for keyboard, emoji panel and IME? It was there in Windows 11 release version...

I have been using version 22H2 for a while so I didn't notice that... Now this is absolutely Microsoft's fault.

JingBh avatar Jul 17 '22 22:07 JingBh