Skip to content

Is there a way to set hiragana as default? #381

Closed

Description

@GAumala

I'm using Mozc 2.17.2240.102 in Arch Linux with the GNOME desktop environment. Everytime I switch to Mozc it starts in input mode "Direct Input" which doesn't write any hiragana. I have to manually set input mode to hiragana to start writing every time. Is it possible to change the default input mode?

Activity

  1. yukawa commented on Aug 28, 2016

    @yukawa
    Collaborator

    Is it possible to change the default input mode?

    Technically, yes, it's possible. You can do that by modifying the source code and rebuild the binaries by yourself. All you need to do is to replace const bool kActivatedOnLaunch = false; with const bool kActivatedOnLaunch = true; in src/unix/ibus/property_handler.cc then rebuild the ibus-mozc binary.

    // 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
    

    More background can be found in #201.

  2. GAumala commented on Aug 28, 2016

    @GAumala
    Author

    That worked for me! Thank you very much for your hard work.

  3. tvdstaaij commented on Sep 2, 2016

    @tvdstaaij

    I just created a customizepkg customization to install mozc-ut (which provides the ibus version by default) with this source modification. See this gist. Might be useful to other Arch Linux users who install mozc from the AUR.

  4. zignd commented on Jul 5, 2021

    @zignd

    Hi @hiroyuki-komatsu! Looking from commit history you seem to be the most active developer on the project. Could you add an UI control or a parameter that could be set somewhere to allow users to set this option?

  5. hiroyuki-komatsu commented on Jul 10, 2021

    @hiroyuki-komatsu
    Collaborator

    Hi Igor,

    The latest version has the parameter to use Hiragana as the default mode.

    I added the document for the configurations.
    https://github.com/google/mozc/blob/master/docs/configurations.md

  6. giner commented on Aug 3, 2022

    @giner

    Ubuntu 22.04 is still using an older version of mozc. One of temporary workaround is rebuilding mozc https://gist.github.com/giner/77f5b0f7c14603ce5e78b6fcebf48162.

  7. foxy123 commented on Jan 13, 2023

    @foxy123

    Ubuntu 22.04 is still using an older version of mozc. One of temporary workaround is rebuilding mozc https://gist.github.com/giner/77f5b0f7c14603ce5e78b6fcebf48162.

    Does it still work? I've tried it on Ubuntu 22.10 and I cannot see any difference.

  8. hiroyuki-komatsu commented on Jan 15, 2023

    @hiroyuki-komatsu
    Collaborator

    That feature is supported by 2.26.4317 or later.
    Please make sure the version on Ubuntu 22.10.

    https://github.com/google/mozc/blob/master/docs/configurations.md#activate-mozc-on-launch

  9. foxy123 commented on Jan 15, 2023

    @foxy123

    That feature is supported by 2.26.4317 or later. Please make sure the version on Ubuntu 22.10.

    https://github.com/google/mozc/blob/master/docs/configurations.md#activate-mozc-on-launch

    Oh, thanks so much. Now I have figured out how to make it work!

  10. Cage89 commented on May 16, 2023

    @Cage89

    same file on windows?

  11. Slider-Whistle commented on Jun 15, 2023

    @Slider-Whistle

    Don't know how I'm just now catching up on this (Gentoo might have been real slow to update this package, or I had something misconfigured) or if there's anyone else this suddenly might be affecting, but this commit 467a91c#diff-7e1afc0e343ee4fe6266908ae286af72842fdc840973548b49983ef94ac959f1 back in 2021 appears to have removed the kActivatedOnLaunch for anybody who might still be confused on where it's gone.

    Rather than patching the package, you should now follow the advice in #381 (comment).

    Sorry to bother everyone who has this issue as a watched thread

  12. ryosuketc commented on May 6, 2024

    @ryosuketc

    @hiroyuki-komatsu I enabled https://github.com/google/mozc/blob/master/docs/configurations.md#activate-mozc-on-launch, which actually worked.
    But what I ideally want is keeping my default input language to English, and chnage only the default input mode for Japanese to Hiragana when I switch to Japanese input.
    The current behaviour seems to change the default language to Japanese Hiragana, rather than keeping it to English.

    Is such configuration already available?

  13. Slider-Whistle commented on May 6, 2024

    @Slider-Whistle

    Hey @ryosuketc, I think the config you're looking for should be under your choice of IME engine, rather than mozc itself. Given that this issue relates to ibus, what you're probably going to want to do is run "ibus-setup", navigate to the second tab "Input Method", and then verify an input method called "English - English (US)" (I'm assuming that's what you want) appears there.
    If English is available there, and it's not being used by default, then there's probably some other software in your OS (like your desktop environment, or a job in your init system) modifying the default keyboard layout. On looking further into things, it looks like ibus itself doesn't have any method for setting a "default", it apparently just goes with whatever's already been set when it starts up?
    Anyway, knowing what OS and Desktop Environment you're using would help me look into changing its settings, but for now running the commands env|grep LANG and setxbkmap -print would be a good start.

  14. ryosuketc commented on May 6, 2024

    @ryosuketc

    Thanks @Slider-Whistle for the comment. I will test more tomorrow but for now the OS is Ubuntu 24.04 LTS.
    If that matters my env for LANG is LANG=en_US.UTF-8.

    My Settings > Keyboard > Input sources has two in order: English (US) and Japanese (Mozc) follows. When I set active_on_launch: True , it actually ignores the order and switches Japanese to the first selection on system start, with Hiragana selected.
    Instead, what I really want is that Mozc respects the system-level language order (English > Japanese) but only changes the default input mode for Mozc to Hiragana instead of "direct input".

  15. yukawa commented on May 7, 2024

    @yukawa
    Collaborator

    Thank you for follow-up questions, but it'd be more convenient and productive for everyone if a new discussion thread can be started at https://github.com/google/mozc/discussions, rather than reusing this thread, which is already too long.

    I'm going to lock this thread to avoid further random questions, but feel free to

    1. Start a new Q&A thread at https://github.com/google/mozc/discussions
    2. Then reference to this thread so that people can still find that there is a follow up thread.

    Thanks!

  16. locked as resolved and limited conversation to collaborators on May 7, 2024
  17. yukawa commented on May 7, 2024

    @yukawa
    Collaborator

    Seems that auto-reference doesn't work for locked issue so I'm manually cross-referencing to a discussion where this thread gets mentioned.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions