pop-os / cosmic-epoch

Next generation Cosmic desktop environment
3.14k stars 84 forks source link

[Suggestion/Feature Request] Allow switching keyboard IM backend. #104

Open CosmicFusion opened 1 year ago

CosmicFusion commented 1 year ago

Please take the KDE aproch for this and allow us to choose the IM backend (ibus, fcitix5, fcitix)

Unlike gnome who enforce crappy ibus

Also consider making fcitix5 the default not ibus :wink:

LumenYoung commented 1 year ago

I second this. Fcitx5 is very modern, actively maintained and extensible. IM is very important aspect for the East-Asia language speakers (Japanese, Korean and Chinese).

As for now, Fcitx5 is a much better backend than ibus. And this is one of the main feature that could be missing on COSMIC, which might prevent me from shifting to COSMIC.

I hope COSMIC developer could consider this on earlier stage of the development, it will save a lot of the effort for later development!

Drakulix commented 1 year ago

ibus as far as I know isn't really usable outside of GNOME anyway, at least not without more deep integration. We are currently working on enabling the required protocols for IME in smithay and cosmic-comp:

Work is very much still in progress, but once that is solved fcitix5's wayland backend should just work (and is what we are testing with anyway).

LumenYoung commented 1 year ago

@Drakulix Thanks for the detailed reply! I'm really glad to learn that COSMIC is moving in this direction. Thank you for your work as well as that from other contributors to make it happen!

gabriele2000 commented 9 months ago

Quick question... how can I change keyboard input, before the option will be available on cosmic-settings?

Currently I have english language for the interface, but I'd like to set the keyboard to Italian, since I'm using an Italian keyboard.

Currently I have no clue how to enforce that in COSMIC

Drakulix commented 9 months ago

Quick question... how can I change keyboard input, before the option will be available on cosmic-settings?

Currently I have english language for the interface, but I'd like to set the keyboard to Italian, since I'm using an Italian keyboard.

Currently I have no clue how to enforce that in COSMIC

Edit ~/.config/cosmic/com.system76.CosmicComp/v1/xkb_config. The option most interesting for you should be layout.

gabriele2000 commented 9 months ago

Edit ~/.config/cosmic/com.system76.CosmicComp/v1/xkb_config. The option most interesting for you should be layout.

Thanks a lot, that fixed the issue!

luccahuguet commented 9 months ago

Quick question... how can I change keyboard input, before the option will be available on cosmic-settings? Currently I have english language for the interface, but I'd like to set the keyboard to Italian, since I'm using an Italian keyboard. Currently I have no clue how to enforce that in COSMIC

Edit ~/.config/cosmic/com.system76.CosmicComp/v1/xkb_config. The option most interesting for you should be layout.

it seems my dir does not have this file (only input-default and input-touchpad), and I can't get fcitx to work

the input-layout I want is "(US, International with dead keys)" if that helps

edit 1: is there any tip to get fcitx5 working?

edit 2: when running the config program i get You're currently running Fcitx with GUI, but fcitx5-config-qt couldn't be found. Now it will open config directory.

edit 3: running fcitx5-remote on the terminal, I always get 0

gabriele2000 commented 9 months ago

it seems my dir does not have this file (only input-default and input-touchpad), and I can't get fcitx to work

the input-layout I want is "(US, International with dead keys)" if that helps

Here, use this

luccahuguet commented 9 months ago

it seems my dir does not have this file (only input-default and input-touchpad), and I can't get fcitx to work the input-layout I want is "(US, International with dead keys)" if that helps

Here, use this

thank you!

juhp commented 7 months ago

Here, use this

Which just contains a xkb_configfile with contents: (rules:"",model:"",layout:"us",variant:"deadkeys",options:None)\n for anyone else trying this.

AMoonRabbit commented 3 months ago

Keeping an eye on this. I have been trying to get fctix-anthy setup but have not been successful in doing so. Has anyone managed to do this themselves yet? I prefer Anthy over Mozc as it defaults to romanji>hiragana input.

anaTropeas commented 2 months ago

Quick question... how can I change keyboard input, before the option will be available on cosmic-settings? Currently I have english language for the interface, but I'd like to set the keyboard to Italian, since I'm using an Italian keyboard. Currently I have no clue how to enforce that in COSMIC

Edit ~/.config/cosmic/com.system76.CosmicComp/v1/xkb_config. The option most interesting for you should be layout.

We edit that and have English and Greek but we cannot setup a keyboard shortcut for changing it yet

NgoHuy commented 2 months ago

fcitx5 works but it uses same input method for all applications regardless per application settings.

NgoHuy commented 2 months ago

fcitx5 works but it uses same input method for all applications regardless per application settings.

it only works on some applications: firefox, telegram, ghostty. it does not work with google chrome, brave, electron applications and all cosmic applications. Some applications, it requires system delegation. EDITED: it works with chrome, brave with --gtk-version=4 and electron 33 with text-input-version 3. But not cosmic applications

julian-hausner commented 2 weeks ago

fcitx5 works but it uses same input method for all applications regardless per application settings.

it only works on some applications: firefox, telegram, ghostty. it does not work with google chrome, brave, electron applications and all cosmic applications. Some applications, it requires system delegation. EDITED: it works with chrome, brave with --gtk-version=4 and electron 33 with text-input-version 3. But not cosmic applications

How did you manage to get it working? I have been trying for a while and can't seem to get anywhere.

darylhjd commented 1 week ago

How did you manage to get it working? I have been trying for a while and can't seem to get anywhere.

After some digging around, I finally managed to do it.

  1. Install fcitx5.
  2. Add your required keyboards through the configuration application.
  3. Cosmic seems to support /.config/autostart so we can use this to start Fcitx5 automatically on boot. Do the following: cp -r /usr/share/applications/org.fcitx.Fcitx5.desktop ~/.config/autostart/fcitx.desktop This runs the Fcitx5 desktop application which starts the fcitx5 service.
  4. Set the following env vars:
    XMODIFIERS=@im=fcitx
    GTK_IM_MODULE=fcitx
    QT_IM_MODULE=fcitx

    You can do this through ~/.profile which is simple.