From 2d83568bb9264db0142f2a6eb2cb32b13676287e Mon Sep 17 00:00:00 2001 From: Gabriele Barbero Date: Sat, 28 Mar 2026 19:02:05 +0100 Subject: [PATCH] tools: prioritize proxy bindings over IM context in text tool Try proxy bindings before the IM context. On macOS and Windows, the IM context consumes Alt+key events (Option produces special characters on macOS; Alt triggers alt-codes on Windows), so bindings such as Alt+Plus/Minus (size) and Alt+arrows (baseline/kerning) would never be reached otherwise. --- app/tools/gimptexttool-editor.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/tools/gimptexttool-editor.c b/app/tools/gimptexttool-editor.c index 3ae30ccaac..5e2153f7bc 100644 --- a/app/tools/gimptexttool-editor.c +++ b/app/tools/gimptexttool-editor.c @@ -538,14 +538,6 @@ gimp_text_tool_editor_key_press (GimpTextTool *text_tool, } } - if (gtk_im_context_filter_keypress (text_tool->im_context, kevent)) - { - text_tool->needs_im_reset = TRUE; - text_tool->x_pos = -1; - - return TRUE; - } - gimp_text_tool_convert_gdkkeyevent (text_tool, kevent); gimp_text_tool_ensure_proxy (text_tool); @@ -558,6 +550,14 @@ gimp_text_tool_editor_key_press (GimpTextTool *text_tool, return TRUE; } + if (gtk_im_context_filter_keypress (text_tool->im_context, kevent)) + { + text_tool->needs_im_reset = TRUE; + text_tool->x_pos = -1; + + return TRUE; + } + gtk_text_buffer_get_iter_at_mark (buffer, &cursor, gtk_text_buffer_get_insert (buffer)); gtk_text_buffer_get_iter_at_mark (buffer, &selection,