Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] macOS中Rime和落格输入法切换失败 #27

Open
RayKr opened this issue Apr 25, 2024 · 9 comments
Open

[Bug] macOS中Rime和落格输入法切换失败 #27

RayKr opened this issue Apr 25, 2024 · 9 comments

Comments

@RayKr
Copy link

RayKr commented Apr 25, 2024

问题描述:在macOS 14.4.1中,只有苹果内置的双拼输入法在切换回insert模式时可以正确唤出中文输入,而Rime和落格输入法则不行。并且查看输入法的配置中,没有正常显示。
image
而在terminal中通过命令行直接执行

im-select com.apple.keylayout.ABC
im-select com.logcg.inputmethod.LogInputMac3.LogInputMac3IME

是可以正常切换到中文输入法并输出中文,配置中也是正常的。
image

配置文件:

return {
  "keaising/im-select.nvim",
  config = function()
    require("im_select").setup({
      -- IM will be set to `default_im_select` in `normal` mode
      -- For Windows/WSL, default: "1033", aka: English US Keyboard
      -- For macOS, default: "com.apple.keylayout.ABC", aka: US
      -- For Linux, default:
      --               "keyboard-us" for Fcitx5
      --               "1" for Fcitx
      --               "xkb:us::eng" for ibus
      -- You can use `im-select` or `fcitx5-remote -n` to get the IM's name
      default_im_select = "com.apple.keylayout.ABC",

      -- Can be binary's name or binary's full path,
      -- e.g. 'im-select' or '/usr/local/bin/im-select'
      -- For Windows/WSL, default: "im-select.exe"
      -- For macOS, default: "im-select"
      -- For Linux, default: "fcitx5-remote" or "fcitx-remote" or "ibus"
      default_command = "im-select",

      -- Restore the default input method state when the following events are triggered
      set_default_events = { "VimEnter", "FocusGained", "InsertLeave", "CmdlineLeave" },

      -- Restore the previous used input method state when the following events
      -- are triggered, if you don't want to restore previous used im in Insert mode,
      -- e.g. deprecated `disable_auto_restore = 1`, just let it empty
      -- as `set_previous_events = {}`
      set_previous_events = { "InsertEnter" },

      -- Show notification about how to install executable binary when binary missed
      keep_quiet_on_no_binary = false,

      -- Async run `default_command` to switch IM or not
      async_switch_im = true,
    })
  end,
}
@keaising
Copy link
Owner

macOS 自带的输入法会有类似的问题吗?

我只有 Rime 和系统自带的英语输入法,测试了一下是正常的

@RayKr
Copy link
Author

RayKr commented May 2, 2024

macOS 自带的输入法会有类似的问题吗?

我只有 Rime 和系统自带的英语输入法,测试了一下是正常的

系统自带的输入法是正常的,但是Rime我也测试了,也会出现这种情况。另外我又通过Keyboard Maestro软件设置了快捷键来切换输入法,也出现了这种情况。因此我初步怀疑这不是im-select的问题,而是macOS系统问题,我的是14.4.1,如果可以您可以先试一下对齐下系统。

image

@RayKr
Copy link
Author

RayKr commented May 2, 2024

就哪怕是通过Keyboard Maestro设置 Set Keyboard Layout to "Squirrel - Simplified"来执行切换,也会出现这种情况。这种感觉就像是输入法切换成功了,但是配置没加载成功。

@keaising
Copy link
Owner

keaising commented May 3, 2024

image

我确实也是 14.4.1,但是没有复现,可能是 bugOS 的什么奇怪 "feature"

@QianChenglong
Copy link

在升级到14.4.1 (23E224)后,也出现了同样的问题,切换到百度输入法后,无法输入中文,应该是最近的os版本引入的bug
image

@keaising
Copy link
Owner

keaising commented May 8, 2024

你们的 Neovim 是什么版本?可以把最近的稳定版和 nightly 都试试吗? @QianChenglong @RayKr

@QianChenglong
Copy link

你们的 Neovim 是什么版本?可以把最近的稳定版和 nightly 都试试吗? @QianChenglong @RayKr

❯ nvim --version
NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1713517273

system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.9.5/share/nvim"

Run :checkhealth for more info

最近升级macos才出现的,用im-select命令执行一样会出问题,和插件无关

@RayKr
Copy link
Author

RayKr commented May 8, 2024

我的也是NVIM v0.9.5,14.4.1 (23E224),相同问题。

@RayKr
Copy link
Author

RayKr commented May 11, 2024

macOS升级到14.5的Public Beta版本也没有修复这个问题。

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

No branches or pull requests

3 participants