Page MenuHome

IME: Ideographic Full Stop to Decimal Point
ClosedPublic

Authored by Harley Acheson (harley) on Jan 22 2022, 8:08 PM.

Details

Summary

Convert Ideographic Full Stop to Decimal Point when entering numbers
into numerical inputs


T93626 illustrates problems entering numbers when using Windows IME, Pinyin, Chinese Mode. One of the problems is that in many cases we need the IME to emit an Ideographic Full Stop, "。", (U+3002) into text inputs. But that character is not recognized as a decimal point when we are processing keys in ui_do_but_textedit. This means users cannot enter a decimal place when in Chinese mode using the main keyboard period key.

This patch just converts Ideographic Full Stop to a regular decimal point if the input type is numeric. This is similar to how this same function can also convert comma to decimal for numpads that emit a comma instead of period.

But this is just about using the main keyboard period key with numerical inputs. There is a related separate patch - D13902: Fix T93626: Win IME Chinese Numpad Decimal - that deals with the use of the numerical keypad decimal 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

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.