Use commit text instead of a zero key event

Thanks @page-down
This commit is contained in:
Kovid Goyal
2022-01-22 21:11:26 +05:30
parent a9e014226e
commit c0be0f74d8
2 changed files with 1 additions and 7 deletions

View File

@@ -152,12 +152,6 @@ on_key_input(GLFWkeyevent *ev) {
debug("invalid state, ignoring\n");
return;
}
if (!native_key && !key && text[0]) {
// key == 0 is sent by the glfw coca backend when text is inserted by the IME outside the key handlers
schedule_write_to_child(w->id, 1, text, strlen(text));
debug("sent key as text to child\n");
return;
}
PyObject *ke = NULL;
#define create_key_event() { ke = convert_glfw_key_event_to_python(ev); if (!ke) { PyErr_Print(); return; } }
if (global_state.in_sequence_mode) {