squirrel icon indicating copy to clipboard operation
squirrel copied to clipboard

mac下聚焦搜索和终端无法输入中文简单解决方案

Open nulllpoint opened this issue 4 years ago • 13 comments

最后感谢rime这么好的全平台输入法, 很理解开源且免费项目的不易, 不胜感激!

最佳解决方案

在用户设定目录的squirrel.yaml里, 发现app_options的配置, 好家伙, 原来不是bug, 是默认给关闭掉了, 这...., 好吧, 这么做肯定也是怕有兼容问题吧可能, 不过, 我试着把这些配置关闭掉, 目前完美使用, 神奇!

app_options:
  com.apple.Spotlight:
    ascii_mode: true
  com.alfredapp.Alfred:
    ascii_mode: true
  com.runningwithcrayons.Alfred-2:
    ascii_mode: true
  com.blacktree.Quicksilver:
    ascii_mode: true
  com.apple.Terminal:
    ascii_mode: true
    no_inline: true
  com.googlecode.iterm2:
    ascii_mode: true
    no_inline: true
  org.vim.MacVim:
    ascii_mode: true  # 初始爲西文模式
    no_inline: true   # 不使用行內編輯
    vim_mode: true    # 退出VIM插入模式自動切換輸入法狀態
  com.apple.dt.Xcode:
    ascii_mode: true
  com.barebones.textwrangler:
    ascii_mode: true
  com.macromates.TextMate.preview:
    ascii_mode: true
  com.github.atom:
    ascii_mode: true
  com.microsoft.VSCode:
    ascii_mode: true
  com.sublimetext.2:
    ascii_mode: true
  org.gnu.Aquamacs:
    ascii_mode: true
  org.gnu.Emacs:
    ascii_mode: true
    no_inline: true
  co.zeit.hyper:
    ascii_mode: true
  com.google.Chrome:
    # 規避 https://github.com/rime/squirrel/issues/435
    inline: true
  ru.keepcoder.Telegram:
    # 規避 https://github.com/rime/squirrel/issues/475
    inline: true

以下不是最佳解决方案

  • 从highserria时候起就发现mac下 聚焦搜索和终端界面用鼠须管(14.x)输入时无法输入中文, 最近用mbp bigsur系统和最新版本的鼠须管15.x+ 发现还是一样的问题.
  • 于是折腾了一番, 最终发现了, 用户设定下default.custom.yaml文件里有'ascii_composer/switch_key: ', 开始事直接将此配置下所有内容注释, 发现shift可以在鼠须管下切换中英模式, 这里的英文模式不是macos的内置英文输入. 进而推测在聚焦搜索和终端时, 不知道什么原因鼠须管会优先使用自己的英文模式, 又因为默认配置的shift和caps_lock都是noop, 即无法切换成鼠须管的中文输入模式.
  • 按找此思路, 最终将caps_lock依然配置成系统的中英切换, ctrl或shift设置成鼠须管的中英切换, 算是目前通过调整配置能达到的最完美的体验, 诚挚的希望官方能优化下.
  • 附最终配置代码:
      ascii_composer/switch_key:
        Caps_Lock: noop
        # Shift_L: commit_code
        Shift_L: noop
        # Shift_R: noop
        Control_L: commit_code
        # Control_L: noop
        # Control_R: noop
    
  • 效果:
WechatIMG25

nulllpoint avatar Aug 25 '21 06:08 nulllpoint

同样遇到了这个问题。我是把shift设置为输入法切换的快捷键,安装后发现在iterm2和emacs里怎么都无法中文输入,搜到你这个issue才找到解决办法。感谢!

kylexlau avatar May 09 '22 15:05 kylexlau

macos12.6.1+rime0.15,安装后默认为true,设置操作后spotlight状态依然,依然不支持中文。不知道是为什么。

zgxlg avatar Dec 08 '22 23:12 zgxlg

macos12.6.1+rime0.15,安装后默认为true,设置操作后spotlight状态依然,依然不支持中文。不知道是为什么。

我也第一时间更新了12.6.1, 没有遇到你说的问题, 我是intel2020款, 或者你有重新部署和同步用户配置么?

nulllpoint avatar Dec 08 '22 23:12 nulllpoint

我的是一款老机子了,i7+16+256的,从10.15.7升级过来,升级就是解决这个问题,但是没有成功解决。都有重新部署和配置。我在考虑要不要重装。

zgxlg avatar Dec 09 '22 00:12 zgxlg

我的是一款老机子了,i7+16+256的,从10.15.7升级过来,升级就是解决这个问题,但是没有成功解决。都有重新部署和配置。我在考虑要不要重装。

好吧,我的建议是你可以找个大点的u盘或者硬盘,把mac系统装在里面,然后安装rime😂, 另外我家里有台自己组装的黑苹果,10.13.6版本,也是没问题的

nulllpoint avatar Dec 09 '22 00:12 nulllpoint

经过我的反复折腾终于最终搞定。非常感谢!

| | @.*** | | @.*** |

---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2022年12月09日 07:47 | | 收件人 | @.> | | 抄送至 | @.>@.> | | 主题 | Re: [rime/squirrel] mac下聚焦搜索和终端无法输入中文简单解决方案 (#584) |

macos12.6.1+rime0.15,安装后默认为true,设置操作后spotlight状态依然,依然不支持中文。不知道是为什么。

我也第一时间更新了12.6.1, 没有遇到你说的问题, 我是intel2020款

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

zgxlg avatar Dec 11 '22 23:12 zgxlg

经过我的反复折腾终于最终搞定。非常感谢!

| | @.*** | | @.*** |

---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2022年12月09日 07:47 | | 收件人 | @.> | | 抄送至 | @.>@.> | | 主题 | Re: [rime/squirrel] mac下聚焦搜索和终端无法输入中文简单解决方案 (#584) |

macos12.6.1+rime0.15,安装后默认为true,设置操作后spotlight状态依然,依然不支持中文。不知道是为什么。

我也第一时间更新了12.6.1, 没有遇到你说的问题, 我是intel2020款

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

恭喜恭喜😂 是什么问题呢, 还是配置问题么?

nulllpoint avatar Dec 11 '22 23:12 nulllpoint

我是用的终端 alacritty 设置了

patch:
  app_options:
    org.alacritty:
      ascii_mode: false
      no_inline: false

依然打不出中文标点

erasin avatar Mar 29 '23 07:03 erasin

我是用的终端 alacritty 设置了

patch:
  app_options:
    org.alacritty:
      ascii_mode: false
      no_inline: false

依然打不出中文标点

不知道你改的是哪一个文件, 并没有看到有'patch: '这个键 image

nulllpoint avatar Mar 29 '23 07:03 nulllpoint

我是用的 rime-ice的方案,使用 patch 补丁方式配置,自定义 squirrel.custom.yaml 配置。 其他的 app 是有效的,只有 org.alacritty 无效。

当然我也试过修改 squirrel.yaml 中的 app_options 选项,依然无效。

很奇怪,如果我设置为true 都是有效的,但还是无法输入中文符号,其他的终端是正常的...

配置效果: 默认中文, 依然英文标点

patch:
  app_options:
    org.alacritty:
      ascii_mode: false
      no_inline: false

配置效果: 默认英文, 切换中文后依然英文标点

patch:
  app_options:
    org.alacritty:
      ascii_mode: true
      no_inline: true

erasin avatar Mar 29 '23 08:03 erasin

我是用的 rime-ice的方案,使用 patch 补丁方式配置,自定义 squirrel.custom.yaml 配置。 其他的 app 是有效的,只有 org.alacritty 无效。

当然我也试过修改 squirrel.yaml 中的 app_options 选项,依然无效。

很奇怪,如果我设置为true 都是有效的,但还是无法输入中文符号,其他的终端是正常的...

配置效果: 默认中文, 依然英文标点

patch:
  app_options:
    org.alacritty:
      ascii_mode: false
      no_inline: false

配置效果: 默认英文, 切换中文后依然英文标点

patch:
  app_options:
    org.alacritty:
      ascii_mode: true
      no_inline: true

我还以为是我配置错了才出现这个问题,原来是通病

thep0y avatar Jul 25 '23 02:07 thep0y