UBSAN has found me a reliance on uninitialised data / undefined behaviour that affects these keys specifically. Fixed here: https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=6a88b294276b9c24584efa18b9a37f437fa46712
This may have some bearing on the matter. If someone (who can reproduce this behaviour with a freshly locally compiled version of PuTTY/pterm) can try applying this patch (attached for convenience) and see if it helps, that might be helpful. (If this is it, it's been latent since 0.78; I guess we just started getting unlucky with the toolchain recently or something.)
commit 6a88b294276b9c24584efa18b9a37f437fa46712 Author: Jacob Nevins <jac...@chiark.greenend.org.uk> Date: Wed Dec 4 17:21:30 2024 +0000 Unix PuTTY/pterm: fix UB with small keypad. We were relying on uninitialised data. Found by UBSAN. (Introduced in commit c88b6d1853, I think.) diff --git a/unix/window.c b/unix/window.c index db0eff31..4a8968d6 100644 --- a/unix/window.c +++ b/unix/window.c @@ -1927,6 +1927,7 @@ gint key_event(GtkWidget *widget, GdkEventKey *event, gpointer data) if (event->state & GDK_CONTROL_MASK) break; + consumed_meta_key = false; end = 1 + format_small_keypad_key( output+1, inst->term, sk_key, event->state & GDK_SHIFT_MASK, event->state & GDK_CONTROL_MASK,