(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:
Current Patch:
Final (include Chinese and Korean support):
Note:
This patch does not include the following three fixes.
- Support Chinese and Korean input (D11699)
- Fixed to draw the position of the candidate window below the input text. (D11696, D11697)
- Fix to remove redundant rendering of input characters when typing from between the strings (D11072)
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,
- type the alphabet,
- press the Space key to select the desired string from the conversion candidate window
- 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.