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

Unable to trigger fcitx5 when using neovide #1006

Closed
Avimitin opened this issue Oct 10, 2021 · 22 comments · Fixed by #1899
Closed

Unable to trigger fcitx5 when using neovide #1006

Avimitin opened this issue Oct 10, 2021 · 22 comments · Fixed by #1899
Labels
bug Something isn't working

Comments

@Avimitin
Copy link

Avimitin commented Oct 10, 2021

Describe the bug
The fcitx5 App is an input method engine that I use for input Chinese. It works on most of my desktop applications like Neovim-QT, Telegram, and Firefox...etc. I recently switched to use neovide. It meets my needs very well, except for one thing: I can't use the hotkey to trigger the input method.

I am using <CTRL>+<SHIFT> and <CTRL>+<SPACE> to trigger my fcitx5. When I press <CTRL>+<SPACE>, it triggers the inner completion menu, and when I press <CTRL>+<SHIFT>, nothing happens.

It's weird because whatever the hotkey I used, the nvim-qt can work as expected, so maybe it is not my neovim configuration error. Moreover, no error report from fcitx5-diagnose, so maybe it is not my fcitx5 configuration error.

But I can't find any issues related to fcitx5, so I am here to ask for help.

To Reproduce
Steps to reproduce the behavior:

  1. Install packages fcitx5, fcitx5-im, fcitx5-rime
  2. Set environment variable like below:
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export QT4_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
export SDL_IM_MODULE=fcitx
export INPUT_METHOD=fcitx
  1. Run fcitx-configtool and add rime below the Keyboard-English

image

  1. Set hotkey like below

image

  1. Open neovide and try to press those hotkey

Expected behavior

The behavior I expect is like nvim-qt. I've recorded a video to show the difference.

2021-10-10.20-54-20.mp4

Desktop (please complete the following information):

  • OS: Linux 5.14.9-arch
  • Neovide Version: Neovide 0.8.0 from neovide-git
  • Neovim Version [e.g. 0.5.0]: NVIM v0.6.0-dev+132-g7d2233fad

Please run neovide --log and paste the contents of the .log file here:

Log:

TRACE [neovide] Neovide version: 0.8.0

Additional context
My rime settings: https://github.com/Avimitin/rime
My NeoVIM settings: https://github.com/Avimitin/nvim
fcitx5 diagnose output: https://pastebin.com/QQ0tERtZ

@Avimitin Avimitin added the bug Something isn't working label Oct 10, 2021
@kaigedong
Copy link

Same problem

@blue7wings
Copy link

Same problem😭

@aj3423
Copy link

aj3423 commented May 2, 2022

same here with 0.9.0

@askfiy
Copy link

askfiy commented May 27, 2022

same

@Icy-Thought
Copy link

Anyone that found a solution to this problem?

@dontdieych
Copy link

same here

@cnfczn
Copy link

cnfczn commented Nov 10, 2022

same 0.10.3

@drednoot
Copy link

Same here with 0.10.3

@vizee
Copy link

vizee commented Nov 29, 2022

Anyone that found a solution to this problem?

I guess it needs to update winit

@elytraflyer
Copy link

I builded it from source code,and the problem isn't fixed

Anyone that found a solution to this problem?

I guess it needs to update winit

@vizee
Copy link

vizee commented Jan 28, 2023

I builded it from source code,and the problem isn't fixed

Anyone that found a solution to this problem?

I guess it needs to update winit

neovide/glutin still depends on neovide/winit

@realth000
Copy link

Same problem.
Any workaround?

@yzlnew
Copy link

yzlnew commented Mar 7, 2023

Can't input Chinese in MacOS using squirrel as well.

@XChy
Copy link

XChy commented May 8, 2023

Same with 0.10.3 still

@fredizzimo
Copy link
Member

This should be fixed by #1899, it would be great if you can test that.

@realth000
Copy link

Any config required?
The release build from commit 402382c seems not fix this.
Tested with arch linux + hyprland, with/without WINIT_UNIX_BACKEND=x11, in vim insert mode and command mode.

@fredizzimo
Copy link
Member

fredizzimo commented Jun 19, 2023

Also note that I'm still working on the pre-edit support. And the positioning of the popup also has some issues and waiting for rust-windowing/winit#2886.

Another thing that will be added later is the possibility to dynamically enable and disable the IME support, so that it can be enabled in only insert mode for example.

@fredizzimo
Copy link
Member

It looks like it's not fixed on X11 yet. But Wayland should work, at least if you follow the above instructions.

@wengxt
Copy link

wengxt commented Jun 20, 2023

@fredizzimo you might need to go to fcitx5's config of xim frontend and check "on the spot" and then restart fcitx5 if you want to try preedit on xim.

There's some historical reason that xim's preedit is not enabled by default.

https://bugs.freedesktop.org/show_bug.cgi?id=1580
https://gitlab.freedesktop.org/xorg/lib/libx11/-/commit/62c3337d89d31e0d3ed807004e73ad711fad3342

@fredizzimo
Copy link
Member

@wengxt, the problem with X11 is that nothing seems to be triggered at all for me at the moment, and other have reported the same in #1899. On Wayland I can get it working by adding the virtual keyboard as described above.

On X11 there appears to be some communication with the server, since the position is changed, and it shows a popup when toggling languages.

But until I started working on this a few days ago, I did barely know what IME was, so it could be a configuration issue on my side. Anyway, if fcitx5 triggers on some system, that would be very valuable information to add to the corresponding winit issue rust-windowing/winit#2888.

BTW, if someone wants to check out the IME "on the spot" pre-edit branch I'm working on, it's here https://github.com/fredizzimo/neovide/tree/fsundvik/ime. It still does not show selected texts, and the rendering is quite hacky and does not support transparency. I think I wait for #1870 until I fix that.

The fcitx popup will also overlap the text in some cases until this rust-windowing/winit#2889 is integrated. I also don't know what to do when you type long lines, and the text would need to be scrolled.

@fredizzimo
Copy link
Member

X11 should now work with #1899

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.