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

Can't repeat key input in Firefox #40

Closed
xuzhao9 opened this issue Mar 10, 2020 · 9 comments
Closed

Can't repeat key input in Firefox #40

xuzhao9 opened this issue Mar 10, 2020 · 9 comments

Comments

@xuzhao9
Copy link

xuzhao9 commented Mar 10, 2020

How to reproduce:

  1. On Firefox, open google.com and focus on any input or textarea element
  2. Press the "d" key (or any key) and hold it down for 3 seconds

Symptom:
Only single "d" letter appears in the input box.

Expected behavior:
Repeating "d" letters should appear in the input box.

The bug only occurs with Firefox+Fcitx5 combined, as shown in the following video:
https://user.fm/files/v2-1ed6131059be478b2bb8b6f90e5892cb/firefox.mkv

The bug disappears on Chromium+Fcitx5:
https://user.fm/files/v2-cfa9f78065813f79160d4971268cdf02/chromium.mkv

@xuzhao9
Copy link
Author

xuzhao9 commented Mar 10, 2020

I have found a workaround:

export GTK_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
firefox

This is because firefox only detects "fcitx", not "fcitx5" in its IMContextWrapper. Closed.
https://github.com/mozilla/gecko-dev/blob/49ed791eec93335abfe6c2880f84c324e73e47e6/widget/gtk/IMContextWrapper.cpp#L480

@xuzhao9 xuzhao9 closed this as completed Mar 10, 2020
@hehelego
Copy link

I have encountered the same issue.
Thanks for posting this issue and the work around.

@dextertd
Copy link

Every time I install fcitx5 onto a new machine (Manjaro Linux), I always have to add the following lines to my ~/.bash_profile because of this problem; without it I cannot use fcitx5 in my most important applications like Firefox or Kate (KDE text editor).

# fcitx5
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx

Is there no way to ensure this happens automatically? Or is this not fcitx5's fault but the fault of other applications. It would be really convenient if manual user intervention wasn't necessary.

@wengxt
Copy link
Member

wengxt commented Aug 17, 2022

do you have fcitx5-gtk installed? @dextertd

@dextertd
Copy link

Yes I do @wengxt I always install the following packages for fresh systems

fcitx5
fcitx5-configtool
fcitx5-chinese-addons
fcitx5-gtk
fcitx5-qt

@wengxt
Copy link
Member

wengxt commented Aug 17, 2022

ah, sorry ; I was confused by the report title and I was thinking that you’re saying you having the same issue.

Yes it’s certainly possible that fcitx install a /etc/profile.d, or /etc/environment.d to set it up, but for setting this environment variable different distribution has their own way doing this. Actually even bash_profile won’t work globally. Especially when there’s other frameworks around like ibus.

I just don’t like to be very intrusive to users system, so I never tried to set those environment variables for users in fcitx.

@dextertd

@dextertd
Copy link

Oh sorry, I should have created a new issue. I misunderstood the original description. That's my bad.

Sure I understand not wanting to be intrusive. I hope you might consider it anyway, as the current situation makes for a less than ideal setting up process in Manjaro, and new users might not understand why fcitx5 is working in some windows and not others. Certainly, when I first installed it, I had to learn about what qt and gtk were before I understood the problem, and then I was able to find a working solution. It was quite a confusing problem. Of course, it was a valuable learning experience, but as a learner who just wanted to type Chinese it felt unnecessarily frustrating.

@wengxt
Copy link
Member

wengxt commented Aug 17, 2022

@dextertd for manjaro case, there’s actually an manjaro specific package called manjaro asian input fcitx5 sth(I don’t remember the exact name, but you can just search for fcitx5)

@xuzhao9
Copy link
Author

xuzhao9 commented Aug 17, 2022

I setup the following environment variables in /etc/environment and I never need to add it anywhere else:

GTK_IM_MODULE=fcitx5
QT_IM_MODULE=fcitx5
XMODIFIERS=@im=fcitx5

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

4 participants