chadliu23 / mozc

Automatically exported from code.google.com/p/mozc
0 stars 0 forks source link

'Set input mode to X' commands do not work while input mode is set to "Direct Input" #246

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install ibus-mozc 1.15.1864.102 into Ubuntu 14.04
2. Create a custom keymap with the following short cut.
   { Mode:"DirectInput", Key:"Ctrl j", Command:"Set input mode to full-width katakana" }
3. Reboot
4. Launch gedit and select Mozc.
5. Hit Ctrl-j.

What is the expected output?
Just after step 4, Mozc is in Direct Input mode.
Just after step 5, Mozc is in Full-width Katakana mode.

What do you see instead?
Just after step 4, Mozc is in Direct Input mode.
Just after step 5, Mozc is still in Direct Input mode.

Please use labels and text to provide additional information.
This issue was originally reported in the Fedora bug tracker.
https://bugzilla.redhat.com/show_bug.cgi?id=1119048

Note that imm32-mozc and tsf-mozc do not have this limitation.

In fact, these commands have been intentionally disabled in Direct Input mode 
because they are not ready.
https://code.google.com/p/mozc/source/browse/trunk/src/session/internal/keymap.c
c?r=210#369
> void KeyMapManager::InitCommandData() {
>   RegisterDirectCommand("IMEOn", DirectInputState::IME_ON);
>   // Support InputMode command only on Windows for now.
>   // TODO(toshiyuki): delete #ifdef when we support them on Mac, and
>   // activate SessionTest.InputModeConsumedForTestSendKey.
> #ifdef OS_WIN
>   RegisterDirectCommand("InputModeHiragana",
>                         DirectInputState::INPUT_MODE_HIRAGANA);
>   RegisterDirectCommand("InputModeFullKatakana",
>                         DirectInputState::INPUT_MODE_FULL_KATAKANA);
>   RegisterDirectCommand("InputModeHalfKatakana",
>                         DirectInputState::INPUT_MODE_HALF_KATAKANA);
>   RegisterDirectCommand("InputModeFullAlphanumeric",
>                         DirectInputState::INPUT_MODE_FULL_ALPHANUMERIC);
>   RegisterDirectCommand("InputModeHalfAlphanumeric",
>                         DirectInputState::INPUT_MODE_HALF_ALPHANUMERIC);
> #else
>   RegisterDirectCommand("InputModeHiragana",
>                         DirectInputState::NONE);
>   RegisterDirectCommand("InputModeFullKatakana",
>                         DirectInputState::NONE);
>   RegisterDirectCommand("InputModeHalfKatakana",
>                         DirectInputState::NONE);
>   RegisterDirectCommand("InputModeFullAlphanumeric",
>                         DirectInputState::NONE);
>   RegisterDirectCommand("InputModeHalfAlphanumeric",
>                         DirectInputState::NONE);
> #endif  // OS_WIN

Having said, I guess ibus-mozc, NaCl Mozc and Android mozc are now ready to 
enable these commands. Let's relax the condition to see what will happen.

Original issue reported on code.google.com by yukawa@google.com on 16 Aug 2014 at 4:19

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r315.

Original comment by yukawa@google.com on 16 Aug 2014 at 4:36