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 not switch IM if not focusing on any text input #647

Closed
trmdi opened this issue Nov 15, 2022 · 11 comments
Closed

Can not switch IM if not focusing on any text input #647

trmdi opened this issue Nov 15, 2022 · 11 comments

Comments

@trmdi
Copy link
Contributor

trmdi commented Nov 15, 2022

I don't know if it also happens on other environments, but on Plasma, you can't switch between IMs if you're not focusing on any text input. Fcitx should let the user switch in any case.
There is also a bug with the checkboxes.

fcitx5-2022-11-15_10 07 49

@zenfas
Copy link

zenfas commented Nov 15, 2022

not relate to the bug! I don't know why icon of Unikey not unify, icon in setting and sytem tray different? Any history about this

@wengxt
Copy link
Member

wengxt commented Nov 15, 2022

@zenfas the icon in tray is from KDE. Likely from the breeze plasma theme. The breeze icon theme doesn't update at the same time. You can file a bug to breeze icon to ask them to sync the fcitx icon from plasma theme to the icon theme.

@wengxt
Copy link
Member

wengxt commented Nov 15, 2022

the main reason of current behavior is due to that every input context may have different state. But I think it to allow operation makes sense if we already using "mostRecentInputContext" to display the state.

@wengxt wengxt closed this as completed in 2f9e9f1 Nov 15, 2022
@trmdi
Copy link
Contributor Author

trmdi commented Nov 15, 2022

What happens when you choose to share the state in all applications? And will your commit work at first startup when the most recent ic = null?

@wengxt
Copy link
Member

wengxt commented Nov 15, 2022

The setCurrentInputMethod is also updated to allow ic to be null to update the setting.

@trmdi
Copy link
Contributor Author

trmdi commented Nov 16, 2022

The setCurrentInputMethod is also updated to allow ic to be null to update the setting.

Just tested it. If you don't focus in any text input, e.g. minimize all windows and show the desktop, then restart fcitx, it will not work. Is this your intention?

The usecase for this wanted behavior:

  • you turn on the PC, and click on fcitx before opening any program
  • or you want to remember the last IM at startup

@wengxt
Copy link
Member

wengxt commented Nov 16, 2022

The setCurrentInputMethod is also updated to allow ic to be null to update the setting.

Just tested it. If you don't focus in any text input, e.g. minimize all windows and show the desktop, then restart fcitx, it will not work. Is this your intention?

The usecase for this wanted behavior:

* you turn on the PC, and click on fcitx before opening any program

* or you want to remember the last IM at startup

So first of all, you have a confusion about the fcitx state.
Fcitx has a concept of "active/inactive". inactive means it's using the 1st im in the list, active means it's the current active one.

图片

So by default, it's switching between "inactive / active". And which one is active is always remembered.
In the default option, the default state of new window is always inactive:
图片

When you set it from tray, you just change what "Active" means, doesn't change the fact that all new window are in inactive state.

To get what you want, you may want to use input method group instead.
Create two groups: One group contains only eng , and one group contains only unikey.

@zenfas
Copy link

zenfas commented Nov 16, 2022

Solution set two group above difficult for linux newbie user (most of them don't know much technicals), can fcitx make it default @wengxt? Also for fcitx4, most of guildeline on internet for install unikey with fcitx is fcitx-unikey.

@wengxt
Copy link
Member

wengxt commented Nov 16, 2022

@zenfas that style is what I hate for.

I don't know why it becomes a de-factor standard since Windows 8.

First of all, per-window input method is desired feature for at least Chinese users. We don't want open a new window and find Chinese is active. We want English always by default in new window. Certain wayland restriction prevent this, but I've always been trying to figure out a solution for it:
#487
#486

Under that assumption, if per-window input method is by default, the alt-tab style switching becomes pretty bad and unpredictable if you have more than 2 input method.

What is the next one after super space (under Windows 8 style context)? To me I rarely get the input method I want on windows. I commonly have to press super space multiple times to get it.

Also, another thing that I hate is that if every input method have to provide their own "English mode". This is what they do for new Chinese Pinyin under windows, but lives a inconsistency between different input method. Imagine that if there's a unikey "english only mode" what's the difference between "pinyin" English mode? do that share the same data? do they provide the similar behavior?

Also on mobile phone, I commonly got a random Chinese/English keyboard when open a new app because it remembers the last used input method.

In the meantime, I do dislike the current UI for input method list in configtool, my ideal UI for it would be a tree that displays all the groups together, but it will need more qml work if I still want easy drag and drop.
图片

Feel free to implement this:
#646

Or this
fcitx/fcitx5-configtool#61

@trmdi
Copy link
Contributor Author

trmdi commented Nov 16, 2022

When you use Share state with All, fcitx can't change its state if mostRecentInputContext == null. Could this be changed?

@wengxt
Copy link
Member

wengxt commented Nov 16, 2022

When you use Share state with All, fcitx can't change its state if mostRecentInputContext == null. Could this be changed?

Added some code to allow this: 52d7d68

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