Blender Git Commit Log
Git Commits -> Revision 0ef794b
Revision 0ef794b by Yuki Hashimoto (master) July 5, 2021, 15:24 (GMT) |
macOS: support Chinese and Korean input for text buttons This patch extends D11695 to provide full support for Chinese and Korean input on macOS. Chinese input notes: You can input symbolic characters (such as '! , '$') during Chinese input. The difference from Japanese input is that multiple `insertText` may be called with a single key down (`keyDown` method). This happens when you input a symbolic character (such as '! , '$') during conversion. The conversion is confirmed (`insertText`) and the symbolic character is entered (`insertText`). To solve this problem, I have `result_text` to concatenate the strings and store them in `result`. Korean input notes: Korean does not display a conversion suggestion window. Like Chinese, Korean input may call multiple `insertText` methods. Also, in Korean, the previous confirmation (`setMarkedText` and `insertText`) and the next conversion is processed (`setMarkedText`) may be called simultaneously with a single key down (`keyDown` method). For example: 1. press g ? (`setMarkedText`) 2. press k ? (`setMarkedText`) 3. press t ? (`setMarkedText`) 4. press k ?? (`setMarkedText`, `insertText`, `setMarkedText`) Fixed so that the `insertText` and the last `setMarkedText` are processed. Also, if a control character (such as Arrow, Enter) is input during Korean input, the conversion will be confirmed (`setMarkedText`, `insertText`) and the original control character will be processed. In other words, if you press the left arrow key while typing in Korean, the cursor will move to the left after the character is confirmed. Therefore, I modified the `keyDown` method so that the `handleKeyEvent` is called again after the `insertText` is processed in the `interpretKeyEvents` method. Differential Revision: https://developer.blender.org/D11699 |
Commit Details:
Full Hash: 0ef794b5534ab28901cbb18d69ba0e6642439ba9
Parent Commit: 83e2f8c
Committed By: Brecht Van Lommel
Lines Changed: +50, -5