fcitx / mozc

Mozc - a Japanese Input Method Editor designed for multi-platform
Other
111 stars 11 forks source link

Predefined ON/OFF keys for mozc does not work #39

Closed oech3 closed 1 year ago

oech3 commented 1 year ago

Describe the bug xkeyboard-config-2.36 does not define Lang1/Lang2 as HNGL/HJCV. It caused some keys undetectable by mozc (https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/issues/326). mozc was changed to use predefined ON/OFF keys (https://github.com/google/mozc/issues/552#issuecomment-1568743184). But they does not work with fcitx5-5.0.23.

To Reproduce Steps to reproduce the behavior:

  1. Set XkbModel to applealu_jis.
  2. Type Eisu when Mozc is enabled. Result: Mozc is still active(still possible to type Japanese).

Expected behavior Mozc should be inactive(unable to type Japanese).

Desktop

wengxt commented 1 year ago

can you run fcitx5 with

fcitx5 --verbose=key_trace=5 and press your "ON" "OFF" key and see what's the keysym in the log?

oech3 commented 1 year ago

Off: D2023-06-04 07:39:49.284449 instance.cpp:890] KeyEvent: Key(Hangul_Hanja states=0) rawKey: Key(Hangul_Hanja states=0) origKey: Key(Hangul_Hanja states=0) Release:0 D2023-06-04 07:39:49.284771 inputcontext.cpp:277] KeyEvent handling time: 0ms result:0 D2023-06-04 07:39:49.420339 instance.cpp:890] KeyEvent: Key(Hangul_Hanja states=0) rawKey: Key(Hangul_Hanja states=0) origKey: Key(Hangul_Hanja states=0) Release:1 D2023-06-04 07:39:49.420565 inputcontext.cpp:277] KeyEvent handling time: 0ms result:0 ON: D2023-06-04 07:40:02.324742 instance.cpp:890] KeyEvent: Key(Hangul states=0) rawKey: Key(Hangul states=0) origKey: Key(Hangul states=0) Release:0 D2023-06-04 07:40:02.325080 inputcontext.cpp:277] KeyEvent handling time: 0ms result:0 D2023-06-04 07:40:02.372724 instance.cpp:890] KeyEvent: Key(Hangul states=0) rawKey: Key(Hangul states=0) origKey: Key(Hangul states=0) Release:1 D2023-06-04 07:40:02.372966 inputcontext.cpp:277] KeyEvent handling time: 0ms result:0

Corresponding of those keys are same at mate-keyboard-properties,xev.

wengxt commented 1 year ago

While the fix is submitted, you might also want to check fcitx5's global option since hangul and hangul_hanja are also used by the global option.