From 73a19e226099781bacd054f5969ee418a825b2ae Mon Sep 17 00:00:00 2001 From: Krzosa Karol Date: Tue, 6 Jan 2026 13:40:45 +0100 Subject: [PATCH] Try decreasing number of events, testing period --- src/text_editor/event.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/text_editor/event.cpp b/src/text_editor/event.cpp index 180c6d5..cb7bb1a 100644 --- a/src/text_editor/event.cpp +++ b/src/text_editor/event.cpp @@ -455,9 +455,17 @@ Event TranslateSDLEvent(SDL_Event *input_event) { } inline void AddEvent(Array *events, Event ev) { - if (ev.kind == EVENT_TEXT_INPUT && (ev.ctrl || ev.alt || ev.super)) { + bool any_special_modifiers = (ev.ctrl || ev.alt || ev.super); + if (ev.kind == EVENT_TEXT_INPUT && any_special_modifiers) { return; } + + if (ev.kind == EVENT_KEY_PRESS && !any_special_modifiers && ev.key >= SDLK_A && ev.key <= SDLK_Z) { + if (ev.key != SDLK_RETURN) { + return; + } + } + if (ev.kind == EVENT_NONE) { return; }