trime icon indicating copy to clipboard operation
trime copied to clipboard

中西文输入状态在切换过数字小键盘或符号键盘后无法保留

Open Kruegerrr opened this issue 1 year ago • 9 comments

Describe the bug 中西文输入状态在切换过数字小键盘或符号键盘后无法保留

To Reproduce Steps to reproduce the bug:

  1. 切换到西文输入
  2. 切换到数字小键盘或符号键盘
  3. 切换回一般输入键盘
  4. 发现最初的西文输入状态已变成中文

Expected behavior 在输入过程中切换到数字小键盘或符号键盘不应影响到中西文输入状态,因此如果在切换前是西文输入状态,切换后仍应保持西文输入状态。

Screenshots

https://user-images.githubusercontent.com/109552167/180436786-e4c38b70-b897-49ec-8266-32968f3c6b3b.mp4

Smartphone (please complete the following information):

  • OS: Android 11
  • Theme: Tongwenfeng
  • Version: 3.2.7
  • Build info:
     Build: null 
     Date: 2022-07-07 10:11 UTC 
     Commit: v3.2.6-90-g68de0c6, 2022-06-29 22:45:02 +0800 
     Branch:  
     Repository: https://github.com/osfans/trime
    

Kruegerrr avatar Jul 22 '22 12:07 Kruegerrr

复现3.2.7

ivysrono avatar Jul 24 '22 00:07 ivysrono

这是reset_ascii_mode开关的特性,不是bug

tumuyan avatar Jul 24 '22 01:07 tumuyan

这是reset_ascii_mode开关的特性,不是bug

reset_ascii_mode仅影响收回的键盘再次打开后的中西文输入状态。当reset_ascii_modefalse时,键盘会保留上次关闭前的中西文输入状态;当reset_ascii_modetrue时,再次打开的键盘输入状态会被重置为中文。reset_ascii_mode无法影响本问题中切换到数字小键盘或符号键盘后的中西文输入状态,请核实。

Kruegerrr avatar Jul 24 '22 13:07 Kruegerrr

仅影响收回的键盘再次打开后的中西文输入状态

你理解错了,是每次切换键盘都会重置

tumuyan avatar Jul 24 '22 14:07 tumuyan

仅影响收回的键盘再次打开后的中西文输入状态

你理解错了,是每次切换键盘都会重置

这是我在reset_ascii_mode分别为truefalse的情况下测试得到的结论。根据您的表述,reset_ascii_modefalse时本Issue的问题不应该存在,可实际情况并非如此,请您也核实一下。

Kruegerrr avatar Jul 24 '22 15:07 Kruegerrr

恐怕你没有注意到一个主题不止一处reset_ascii_mode

tumuyan avatar Jul 24 '22 15:07 tumuyan

恐怕你没有注意到一个主题不止一处reset_ascii_mode

我已经使用全局搜索确认主题的全部reset_ascii_mode均已设置为false,不知您指的是哪一处? 如果目前默认的配置不会出现本Issue中的问题,能否请您上传一下复现过程的录屏?

Kruegerrr avatar Jul 24 '22 16:07 Kruegerrr

bug应该属实,但是现在的逻辑已经太复杂了,估计修起来有点麻烦 需要输入较多英数混合内容,暂时建议切换到英文键盘

tumuyan avatar Jul 25 '22 01:07 tumuyan

Hi, thanks for using Trime.

Sorry for the inconvenience. This bug occurs because currently Trime doesn't have a logic to save the "current status" of a keyboard. When you switch keyboard from number to Chinese, all it can do is simply apply that keyboard with no "memorized state", and so that the ascii_mode will be same to the ascii_mode of the keyboard, i.e. true.

To fix this, it may need many change to Trime itself, so I don't think it will be fixed soon. You have to wait for it, as there are too many things Trime needs to improve and only 3-5 part-time maintainers.

If you can make it yourself, PRs are always welcomed!

InfinityLoop1308 avatar Jul 29 '22 05:07 InfinityLoop1308