Skip to content

Enhancement Request: making initial mode customizable for ibus-mozc #201

Closed

Description

@GoogleCodeExporter
Recently, IBus developers are changing the design of IBus; they try to let 
users use Eisu input mode of ibus-anthy or ibus-mozc instead of Japanese 
keyboard engine (xkb:jp::jpn).

A problem is ibus-mozc always starts with Hiragana mode although many users 
expect that it starts with Eisu mode.

Is is possible to make the initial mode of Mozc customizable?

My proposal is that users can choose one from:
- Always Eisu
- Always Hiragana
- Start with the previous mode (Mac OS X-like behavior)
The third option allows to save the last input mode and restore it at the next 
session. It is useful to use ibus-mozc in both the new way above and the old 
way with xkb:jp::jpn.

ibus-anthy will support this feature.
http://code.google.com/p/ibus/issues/detail?id=1662

Original issue reported on code.google.com by f.takeya...@gmail.com on 24 Oct 2013 at 3:51

Activity

  1. ckolivas commented on May 21, 2015

    @ckolivas

    Many of us depended on the default behaviour of starting in hiragana mode and now I'm unable to find a meaningful way to configure it to go to hiragana mode by default which means every time I switch input methods I also have to select hiragana from the system tray (on the few remaining desktop environments where it still works). How is this progress? How do we restore the original behaviour?

  2. yukawa commented on May 21, 2015

    @yukawa
    Collaborator

    Unfortunately there is no update since no one has volunteered to work on that. That's actually one of the the reasons why we decided to deprecate ibus-mozc (#287). I wish I could help, but I'm unable to spend as much time with ibus-mozc anymore as I'm also in charge of many projects such as Chromium and Android as well as other clients of Mozc such as Mozc for Android and Mozc for Windows.

    If you wish to change the default behavior to the original one, I would do that if you could make a consensus among ibus-mozc maintainers in major Linux distributions (Fedora, Ubuntu, Debian, openSuse, Arch, Gentoo, ...). Please note that some people don't like the previous behavior as pointed out in the first post in this thread.

    Also, as I pointed it out in my previous comment, you can change the behavior by modifying the source code and rebuild the binaries by yourself.
    See src/unix/ibus/property_handler.cc Line 78 - 86

    // Some users expect that Mozc is turned off by default on IBus 1.5.0 and later.
    // https://code.google.com/p/mozc/issues/detail?id=201
    // On IBus 1.4.x, IBus expects that an IME should always be turned on and
    // IME on/off keys are handled by IBus itself rather than each IME.
    #if IBUS_CHECK_VERSION(1, 5, 0)
    const bool kActivatedOnLaunch = false;
    #else
    const bool kActivatedOnLaunch = true;
    #endif  // IBus>=1.5.0
    

    All you need to do is to replace const bool kActivatedOnLaunch = false; with const bool kActivatedOnLaunch = true; and rebuild the ibus-mozc binary.

    A problem is ibus-mozc always starts with Hiragana mode although many users expect that it starts with Eisu mode.

    Thank you for your understanding.

  3. ckolivas commented on May 21, 2015

    @ckolivas

    Thanks for responding. Ubuntu is defaulting to direct input which is the problem for me. As ibus-mozc is being deprecated I shall return to using ibus-anthy which defaults to hiragana, thank you.

  4. yukawa commented on May 21, 2015

    @yukawa
    Collaborator

    Just for your reference, Ubuntu 15.10 is supposed to start using Fcitx rather than ibus as their default input method (input method framework), which is another reason for me to hesitate to spend my time to improve ibus-mozc. Probably fcitx-mozc would be in far better situation than ibus-mozc in terms of maintenance resources.

    See following pages about the direction of Ubuntu.

  5. hanaokaiwa commented on Aug 1, 2016

    @hanaokaiwa

    I am wondering why ibus-mozc behaves deferently as fcitx-mozc.
    Which behavior should be right? How ibus-anthy and fcity-anthy behaves as default?
    ibus-mozc's behavior now is just because somebody requests this. But I request for default method of HIRAGANA and I think more people request the same than who requests for default of DIRECT.

  6. yukawa commented on Aug 1, 2016

    @yukawa
    Collaborator

    ibus-mozc's behavior now is just because somebody requests this. But I request for default method of HIRAGANA and I think more people request the same than who requests for default of DIRECT.

    I do understand you frustration, but the behavior change was actually based on recommendation by ibus core committer and ibus-mozc package maintainers of multiple Linux distributions (AFAIK package maintainers in openSUSE and Ubuntu preferred this default behavior). It's not a random somebody at all. So if you really think we should change the behavior again, let me reiterate my previous comment.

    If you wish to change the default behavior to the original one, I would do that if you could make a consensus among ibus-mozc maintainers in major Linux distributions (Fedora, Ubuntu, Debian, openSuse, Arch, Gentoo, ...).

    So please reach out ibus-mozc package maintainers of major Linux distributions to make a consensus to do that. If they (or most of them) agree to change the behavior, I'm happy to do that (if ibus-mozc is not removed from our repository yet. See #287 for details. Basically our plan is to discontinue the support of ibus some time soon)

  7. hanaokaiwa commented on Aug 4, 2016

    @hanaokaiwa

    Thank you very much for your reply.
    I just upgraded my Fedora and it took too much time for me to modify ibus-mozc's source code and rebuild the package.
    Thank you very much for your explain. I know it is very difficult to change the behavior of ibus-mozc now. Thank you.

  8. added a commit that references this issue on Jun 16, 2018
  9. Dreamsorcerer commented on Aug 29, 2020

    @Dreamsorcerer

    Just for your reference, Ubuntu 15.10 is supposed to start using Fcitx rather than ibus as their default input method (input method framework), which is another reason for me to hesitate to spend my time to improve ibus-mozc. Probably fcitx-mozc would be in far better situation than ibus-mozc in terms of maintenance resources.

    Did something change? I'm now on Ubuntu 20.04 and this is still an issue, it still seems to use ibus-mozc, and even if I install fcitx-mozc, it doesn't change anything.

  10. ftake commented on Mar 14, 2021

    @ftake
    Contributor

    Now we have a user config file for ibus-mozc. So I think we can resolve this issue.

  11. Dreamsorcerer commented on Mar 14, 2021

    @Dreamsorcerer

    Great, is there some documentation for this? Has it just been added, or is this already available (e.g. in Ubuntu 20.04)?

  12. ftake commented on Mar 15, 2021

    @ftake
    Contributor

    Sorry for my misleading comment. We still need some code to resolve this.

  13. Dreamsorcerer commented on Mar 15, 2021

    @Dreamsorcerer

    Ah, I see what you mean now. No problem.

  14. ftake commented on Mar 16, 2021

    @ftake
    Contributor

    I've started PoC.
    https://github.com/ftake/mozc/commits/feature/initial-composition-mode
    This code is not tested at all for now.

    You will be able to customize activated_on_launch and initial_composition_mode with ~/.mozc/ibus_config.textproto

  15. ftake commented on Mar 17, 2021

    @ftake
    Contributor

    It looks working as expected

    For example, if you want to activate ibus-mozc with full Katakana mode, write following lines in that file.
    By omitting initial_composition_mode, the initial mode becomes HIRAGANA.

    activated_on_launch : true
    initial_composition_mode : FULL_KATAKANA
    
  16. Nocifer commented on Mar 18, 2021

    @Nocifer

    Well, how very nice that after months and months of getting annoyed with this issue, I finally decide to come here and make a report about it, only to find that someone has just implemented a patch to solve it :)

    The patch does work very nicely, and IMHO this should be the default behavior of Mozc. But, even though for my needs it's perfectly adequate as it stands, to really become complete it needs two more things: the first is of course to expose it in the GUI (instead of having to edit ibus_config.textproto) and the second is to make it so that whenever the user changes the input mode manually, Mozc will optionally remember this choice and set it as the new default for subsequent sessions.

  17. hiroyuki-komatsu commented on Mar 20, 2021

    @hiroyuki-komatsu
    Collaborator

    Thank you very much Fuminobu for your suggestion and proof-of-concept.

    As you suggested 467a91c enabled to configure the initial state on launch.
    The implementation is different from your POC, but the concept is equivalent.

    Default ~/.config/mozc/ibus_config.textproto

    engines {
      name : "mozc-jp"
      longname : "Mozc"
      layout : "default"
      layout_variant : ""
      layout_option : ""
      rank : 80
    }
    active_on_launch: False
    

    Sample configuration

    engines {
      name : "mozc-jp"
      longname : "Mozc"
      layout : "ja"
      layout_variant : ""
      layout_option : ""
      rank : 80
    }
    active_on_launch: True
    

    Sample configuration #2

    engines {
      name : "mozc-jp"
      longname : "Mozc"
      layout : "ja"
      layout_variant : ""
      layout_option : ""
      rank : 80
    }
    engines {
      name : "mozc-us"
      longname : "Mozc US"
      layout : "us"
      layout_variant : ""
      layout_option : ""
      rank : 80
    }
    active_on_launch: True
    

    You may need to run ibus restart after the modification.

  18. ftake commented on Mar 21, 2021

    @ftake
    Contributor

    Thank you.
    I'm very happy for making this customizable because I suggested turning the default mode to IME off for IBus 1.5, 6 years ago.

  19. Orzelius commented on Apr 27, 2021

    @Orzelius

    Can I configure this on Windows (google Japanese input) somehow or I have to build and install Mozc on its own?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions