blender/intern
Yuki Hashimoto 0ef794b553 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
2021-07-05 17:24:34 +02:00
..
atomic Atomics: Add 16 bit fetch + AND and fetch + OR signed integer operations 2020-12-04 18:28:46 +01:00
audaspace
clog Cleanup: comment blocks, trailing space in comments 2021-06-24 15:59:34 +10:00
cycles Cleanup: spelling, punctuation 2021-07-05 22:27:03 +10:00
dualcon Spelling: Then Versus Than 2020-10-19 08:43:08 -07:00
eigen
ffmpeg Fix: VSE search in mpegts files would fail 2021-06-11 14:05:07 +02:00
ghost macOS: support Chinese and Korean input for text buttons 2021-07-05 17:24:34 +02:00
glew-mx Cleanup: GPUState: Remove stack from the state manager and rename it 2020-08-18 21:30:10 +02:00
guardedalloc Cleanup: full sentences in comments, improve comment formatting 2021-06-26 21:50:48 +10:00
iksolver Cleanup: Spelling Mistakes 2021-06-22 10:54:50 -07:00
itasc Cleanup: repeated terms in code comments & error messages 2021-06-28 15:46:08 +10:00
libc_compat Build: add more libc compatibility functions for upcoming libraries update 2020-07-09 18:10:05 +02:00
libmv Cleanup: comment blocks, trailing space in comments 2021-06-24 15:59:34 +10:00
locale
mantaflow Cleanup: repeated terms in code comments & error messages 2021-06-28 15:46:08 +10:00
memutil Cleanup: use C style doxygen comments 2020-09-12 16:33:34 +10:00
mikktspace Cleanup: use '#if 0' for commented code-block 2021-06-24 15:53:26 +10:00
numaapi Cleanup: use angle-brackets for email addresses 2020-09-30 12:05:56 +10:00
opencolorio Cleanup: comment blocks, trailing space in comments 2021-06-24 15:59:34 +10:00
opensubdiv Fix invalid return value assignment in getEdgeVertexIndices 2021-06-10 02:22:45 +10:00
openvdb Cleanup: full sentences in comments, improve comment formatting 2021-06-26 21:50:48 +10:00
quadriflow Quadriflow: Fix compilation error with C++17 2020-06-19 12:02:21 +02:00
rigidbody Geometry Nodes: Add Convex Hull Node 2021-06-09 11:58:08 -05:00
sky Cleanup: Clang-tidy, readability-non-const-parameter. 2020-11-07 21:52:53 +05:30
utfconv Cleanup: spelling 2021-03-12 00:51:29 +11:00
CMakeLists.txt Atomic: Cover with unit tests 2020-11-19 17:19:48 +01:00