Skip to content

Direct mode key stored in mozc::client::Client may not be updated upon config change #1202

Open

Description

@wengxt

Description

I'm coming from fcitx#62 but it seems that this is an issue in mozc's code

direct_mode_keys_ in client.cc (

direct_mode_keys_ = KeyInfoUtil::ExtractSortedDirectModeKeys(
) is only updated on:

  1. constructor
  2. SetConfig

That makes this option is not updated correctly when changing from mozc_tool at runtime. I wonder, if there's a way to allow engine to refresh this changes or detect whether the config is updated? (A.k.a, if there is a way for me to write some code in fcitx to do the right thing)

Steps to reproduce

Change direct mode related key
Use it in client

Expected behavior

Change to direct mode key is updated.

Actual behavior

Direct mode key remains unchanged until engine restart.

Screenshots

Version or commit-id

Mozc-2.31.5712.102+24.11.oss

Environment

  • OS: Arch linux
  • IMF (for Linux) Fcitx5, but probably not relevant.
  • Related Applications [e.g. Chromium 109, gedit, etc]

Investigations

  • Whether this issue happens on both Ibus and other IMF (e.g. Fcitx, uim).
    • yes, no, N/A
  • Whether this issue happens on other IMEs (e.g. Anthy, SKK).
    • yes, no, N/A
  • What applications this issue happens on (e.g. Chromium, gedit).
    • list of applications
  • What applications this issue does not happen on (e.g. Chromium, gedit).
    • list of applications, or not-found
  • (optional) What versions or commit-ids this issue did not happen on
    (e.g. Mozc-2.28.4960.100+24.11.oss).
    • list of versions or commit-ids, or no-investigation.

Additional context

Add any other context about the problem here.

Activity

  1. yukawa commented on Mar 1, 2025

    @yukawa
    Collaborator

    I'm coming from fcitx#62 but it seems that this is an issue in mozc's code

    Yeah, this is one of known limitations that I really wanted to get rid of.

    For now, feel free to forward such issues to us and close the one in the fcitx-mozc side. Hopefully I can find some time to wok on this area after other on-going large changes are done.

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