You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
Reacted by Lily, Lunardog, dqwyy, Shinya Murakami, hirokihokari, Adithya, i2tsuki, Sam Johnson, Sofia, Stanislav German-Evtushenko and 14 more
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
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.
Reacted by Gabriel Aumala, Matthew Bauer and Rodrigo Quesada
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?
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
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.
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".
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
Activity
yukawa commentedon Aug 28, 2016
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;withconst bool kActivatedOnLaunch = true;in src/unix/ibus/property_handler.cc then rebuild the ibus-mozc binary.More background can be found in #201.
GAumala commentedon Aug 28, 2016
That worked for me! Thank you very much for your hard work.
tvdstaaij commentedon Sep 2, 2016
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.
zignd commentedon Jul 5, 2021
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?
hiroyuki-komatsu commentedon Jul 10, 2021
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
theo: Use hiragana in mozc input by default
giner commentedon Aug 3, 2022
Ubuntu 22.04 is still using an older version of mozc. One of temporary workaround is rebuilding mozc https://gist.github.com/giner/77f5b0f7c14603ce5e78b6fcebf48162.
foxy123 commentedon Jan 13, 2023
Does it still work? I've tried it on Ubuntu 22.10 and I cannot see any difference.
hiroyuki-komatsu commentedon Jan 15, 2023
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
foxy123 commentedon Jan 15, 2023
Oh, thanks so much. Now I have figured out how to make it work!
Cage89 commentedon May 16, 2023
same file on windows?
Slider-Whistle commentedon Jun 15, 2023
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
ryosuketc commentedon May 6, 2024
@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?
Slider-Whistle commentedon May 6, 2024
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 LANGandsetxbkmap -printwould be a good start.ryosuketc commentedon May 6, 2024
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".
yukawa commentedon May 7, 2024
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
Thanks!
yukawa commentedon May 7, 2024
Seems that auto-reference doesn't work for locked issue so I'm manually cross-referencing to a discussion where this thread gets mentioned.