macOS: Suppress _glfwInputKey during preediting

During preediting, the following keys

- arrow keys
- enter key
- backspace key
- ...

should not be passed to an application.
This commit is contained in:
Daijiro Fukuda 2022-05-23 11:32:34 +09:00
parent 97f52c9cf8
commit dcfde1a0db

View File

@ -580,6 +580,7 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
const int key = translateKey([event keyCode]);
const int mods = translateFlags([event modifierFlags]);
if (![self hasMarkedText])
_glfwInputKey(window, key, [event keyCode], GLFW_PRESS, mods);
[self interpretKeyEvents:@[event]];