Locate the mode toggling button on the IME toolbar when the taskbar is hidden
cherry-picked from https://github.com/elsejj/im-select-mspy/pull/4. As this repository has been inactive for two years, I recommend users of im-select-mspy take a look to https://github.com/elsejj/im-select-mspy
To maximize screen real estate and prevent OLED burn-in, I’ve developed a habit of enabling the auto-hide taskbar feature. However, when the taskbar is hidden, UIAutomation cannot locate the system tray input indicator.
I’ve also been frustrated by the unpredictable Chinese-English state of Microsoft Pinyin. On Windows, without excellent indicator tools like [Input Source Pro](https://inputsource.pro/), it’s hard to know the current input state. To address this, I enable the [Microsoft Pinyin IME toolbar](https://support.microsoft.com/en-us/windows/microsoft-pinyin-ime-9b962a3b-2fa4-4f37-811c-b1886320dd72#id0ebh=microsoft_pinyin) and place it in the top-right corner of the screen to monitor the input state.
This PR adds functionality to locate the button for toggling between Chinese and English modes on the IME toolbar. It serves as a fallback option when the system tray input indicator is auto-hidden along with the taskbar.
Before using this feature, you need to enable the IME toolbar and ensure the "Chinese/English" button is visible on the toolbar.
Additionally, since I use PowerToys to map the Caps Lock key to a [special key](https://x.com/enihsyou/status/1887943807578304853) for Chinese-English switching, I’ve added a feature that allows inputting any [Virtual Key codes](https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes).
---
从 https://github.com/elsejj/im-select-mspy/pull/4 拣选。由于该仓库已两年未更新,建议使用 im-select-mspy 的用户可以看看 https://github.com/elsejj/im-select-mspy
为了多享用一些屏幕空间,避免OLED烧屏,我有开启自动隐藏任务栏的习惯,但隐藏状态下 UIAutomation 找不到托盘输入指示器。
同时我也烦恼于微软拼音薛定谔的中英文状态。在 Windows 平台缺少 [Input Source Pro](https://inputsource.pro/) 那样优秀的提示软件,难以得知当前输入状态,所以我会开启微软拼音的[输入法工具栏](https://support.microsoft.com/zh-cn/windows/microsoft%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87-ime-9b962a3b-2fa4-4f37-811c-b1886320dd72#id0ebh=microsoft_pinyin),放在屏幕右上角观察状态。
这个 PR 添加了从输入法工具栏中寻找切换中英模式的按钮的功能。作为托盘输入指示器连同任务栏一起自动隐藏的后备方案。
想要该功能生效,需要先启用输入法工具栏,并确保"中/英文"按钮显示在工具栏中
另外因为我用 PowerToy 把 Capslock 映射成[特殊的按键](https://x.com/enihsyou/status/1887943807578304853)实现中英文切换,所以添加了个允许输入任意 [Virtual Keys 键代码](https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes) 的功能
合并状态:未合并 0 条评论