From 713c45e9395eb22aeba739352f054c22c409faf2 Mon Sep 17 00:00:00 2001 From: Luca Toniolo <10792599+grandixximo@users.noreply.github.com> Date: Sat, 14 Nov 2026 12:44:49 +1100 Subject: [PATCH] gladevcp: flush forwarded key events to AXIS keyboard_forward() sends key events from an embedded GladeVCP panel to AXIS with python-xlib send_event(), which only queues the request in the client's output buffer. Nothing flushes it until the next round trip, the get_geometry() of the next forwarded key event. A KeyRelease therefore stays queued until another key is pressed, and an AXIS keyboard jog started with focus in the panel keeps running after the key is released. Flush after each send_event(). The fix was found by Jan (+Jan+ on the LinuxCNC forum). Fixes #4839 --- lib/python/gladevcp/xembed.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/python/gladevcp/xembed.py b/lib/python/gladevcp/xembed.py index 830cc7a07c2..975828d8b01 100644 --- a/lib/python/gladevcp/xembed.py +++ b/lib/python/gladevcp/xembed.py @@ -108,6 +108,9 @@ def forward(w, e, fw): if not fe: return fw.send_event(fe) + # send_event only queues the request; flush so a KeyRelease is not + # held back until the next key event + d.flush() window.connect_after("key-press-event", forward, fw) window.connect("key-release-event", forward, fw)