Page MenuHome

Fix T93626: Win IME Chinese Numpad Decimal
ClosedPublic

Authored by Harley Acheson (harley) on Jan 22 2022, 7:39 PM.

Details

Summary

Allow Windows IME Pinyin, Chinese Mode, numpad decimal key to return
decimal character.


When processing text input through Chinese IME we have a function that determines whether characters go through that system or are used as-is. This is currently filtering based on the input ascii character. Unfortunately the period key on the main keyboard and the decimal key on the numerical keypad both resolve to an ascii "."

We must send the main keyboard period key through the IME because - when in Chinese mode - that is intended to emit Chinese full stop, "。", (U+3002), basically their wide version of sentence stop, into text inputs. However we can't send numerical keypad decimal point through the IME because we get nothing out of it. Therefore users cannot enter decimal places into Blender number inputs using numpad decimal key when in Chinese mode.

This patch just alters IsImeKeyEvent so that it also takes a GHOST_TKey argument so that we can differentiate between these two keys and therefore solve this problem by excluding GHOST_kKeyNumpadPeriod.

But this is just about using numpad decimal point key with numerical inputs. There is a related separate patch - D13903: IME: Ideographic Full Stop to Decimal Point - that deals with the use of the main keyboard period key to enter decimals into numerical inputs. These issues are different and can be considered, reviewed, approved or not, and even reverted separately.

Diff Detail

Repository
rB Blender

Event Timeline

Harley Acheson (harley) requested review of this revision.Jan 22 2022, 7:39 PM
Harley Acheson (harley) created this revision.
Harley Acheson (harley) edited the summary of this revision. (Show Details)Jan 22 2022, 7:43 PM
This revision is now accepted and ready to land.Jan 24 2022, 8:36 PM

@Takahiro Shizuki (sntulix) - I know you've already tested this solution and reported so here: https://developer.blender.org/T93626#1293113, but I'm hoping you can just add a quick note here that you've tested this. Then in the "Add Action..." dropdown select that you "Accept" this revision.

Will commit based on my own testing and on test results reported by @Takahiro Shizuki (sntulix) on this solution reported on T93626: Can't input '. ' in Transform input box (when using IME)

@Takahiro Shizuki (sntulix) wrote:
I checked. It's good.

checked list

  • object properties
    • Location X
      • Microsoft IME Pinyin
        • Numpad's key 0-9 . - + * /
        • Numpad's key "0.1+1" -> 1.1m.
      • Microsoft IME Pinyin (compatible)
        • Numpad's key 0-9 . - + * /
        • Numpad's key "0.1+1" -> 1.1m.

(updated.)

I’m not Chinese IME User, so I can’t review about converting “ 。” to “.”.

(updated.)

I’m not Chinese IME User, so I can’t review about converting “ 。” to “.”.

No problem. You are always so helpful. What languages do you use?

(updated.)

I’m not Chinese IME User, so I can’t review about converting “ 。” to “.”.

No problem. You are always so helpful. What languages do you use?

I use Japanese only. (It consists かな(kana), 漢字(chinese characters), english and roman alphabet.)