Page MenuHome

When IME is On, passing key inputs excluding caret operation to IME. (Windows)
Confirmed, NormalPublicBUG

Description

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: Intel(R) Iris(TM) Graphics 5100 Intel 4.3.0 - Build 20.19.15.4531

Blender Version
Broken: version: 3.0.0 Alpha, branch: master (modified), commit date: 2021-07-11 05:31, hash: rB2289e26fa306
Worked: (newest version of Blender that worked as expected)

Short description of error
In Translation set "Japanese", Interface is "checked, with input box,
When IME(Roma-ji) opend input puts a first letter to input box. (ex. 「あ」->「aあ」, 「か」->「kか」)

I don't know how to post my modified branch's source yet.

So I paste the modifed hunks.

GHOST_SystemWin32.cpp:1222
    /* passing key inputs excluding caret operation (move, select) and deleting to IME */
    if ((!ctrl_pressed && !alt_pressed) &&
        (raw.data.keyboard.VKey != VK_BACK
            && raw.data.keyboard.VKey != VK_RETURN
            && raw.data.keyboard.VKey != VK_SHIFT
            && raw.data.keyboard.VKey != VK_CONTROL
            && raw.data.keyboard.VKey != VK_ESCAPE
            && raw.data.keyboard.VKey != VK_END
            && raw.data.keyboard.VKey != VK_HOME
            && raw.data.keyboard.VKey != VK_LEFT
            && raw.data.keyboard.VKey != VK_UP
            && raw.data.keyboard.VKey != VK_RIGHT
            && raw.data.keyboard.VKey != VK_DOWN
            && raw.data.keyboard.VKey != VK_DELETE)) {
      if (window->getImeInput()->GetOpenStatus(window->getHWND())) {
        return NULL;
      }
    }
GHOST_ImeWin32.h:271
/* Retrieve the open status of IMM. */
bool GetOpenStatus(HWND window_handle);
GHOST_ImeWin32.cpp:385
bool GHOST_ImeWin32::GetOpenStatus(HWND window_handle)
{
  bool result = false;
  HIMC imm_context = ::ImmGetContext(window_handle);
  if (imm_context) {
    result = ::ImmGetOpenStatus(imm_context);
  }
  return result;
}

Revisions and Commits

Event Timeline

Takahiro Shizuki (sntulix) renamed this task from When IME is On, passing key inputs excluding caret operation to IME. to When IME is On, passing key inputs excluding caret operation to IME. (Windows).Tue, Jul 13, 9:10 AM
Takahiro Shizuki (sntulix) updated the task description. (Show Details)
Takahiro Shizuki (sntulix) updated the task description. (Show Details)

The following is a patch against current master. I made only a few changes:

  • "GetOpenStatus" name changed to "is_open"
  • Comments changed.
  • processKeyEvent "If" conditions changed (because C++ short-circuits).

But you could submit this here if you like: https://developer.blender.org/differential/diff/create/ or I can do so and you can then commandeer it. Or I can help in other ways. Just ask.

Hi, harley.

Thank you.
I modified some and import your changes, and send the patch.
https://developer.blender.org/D11929

Best Regards.
sntulix

Germano Cavalcante (mano-wii) changed the task status from Needs Triage to Confirmed.Fri, Jul 16, 7:16 PM
Germano Cavalcante (mano-wii) changed the subtype of this task from "Report" to "Bug".

This is a long log.

win10-msime-japanese-romaji

win10-atok-japanese-romaji

win10-atok-japanese-hankaku-print_no_letter

win10-atok-japanese-zenei

win10-google_ime-japanese-romaji

win10-google_ime-japanese-hankaku

win10-corvusSKK-japanese-romaji

win10-corvusSKK-japanese-mode_SKK(hankaku)-print_no_letter

win10-msime-chinese-chinese_simplified

win10-msime-chinese-english-print_no_letter

win10-msime-korean-hangul

win10-msime-korean-english