(I am not used to English expressions, so please forgive me if I am impolite.)
This patch is part of T51283.
This patch includes protocol updates (D11407) and code cleanup (D11434).
Applying them first will make this patch a little easier to read.
**Problem**
Blender dit not support to input East Asian characters (Chinese, Japanese, Korean) on Mac.
This patch supports Japanese input.
**Solution**
I implemented the appropriate processing in the methods of NSTextInputClient Protocol.
Old:
{F10195418}
Current Patch:
{F10195420}
Final (include Chinese and Korean support):
{F10195422}
**Note:**
This patch does **not** include the following three fixes.
1. Support Chinese and Korean input
2. Fixed to draw the position of the candidate window below the input text.
3. Fix to remove redundant rendering of input characters when typing from between the strings
1
Since additional code is required, these implementations will be submitted as separate patches.
2 & 3
Since the source code in /source/blender/ will be changed, I will submit it as a separate patch, considering the influence on Windows.
**Technical Note:**
This section explains Japanese input.
For Japanese input, when the input method is enabled,
1. type the alphabet,
2. press the Space key to select the desired string from the conversion candidate window
3. press the Enter key to confirm.
- The conversion candidate window is drawn by the input method program calling `firstRectForCharacterRange`.
- The string before confirmation (called `composite` in blender) is handled in the `setMarkedText` method called by the input method program.
- The string after confirmation (called `result` in the blender) is processed in the `insertText` method called by the input method program.