code: drawterm

Download patch

ref: 789b8fe40e156ad0252230b13dd4ada96f3eed8b
parent: 877bce095a192ead0e9b6e0d5ce3071482cf0f6e
author: aap <[email protected]>
date: Mon Sep 9 09:08:35 EDT 2024

x11: only turn ASCII chars into control chars when ctrl is down

--- a/gui-x11/x11.c
+++ b/gui-x11/x11.c
@@ -923,7 +923,8 @@
 		k = XK_minus;
 	/* Do control mapping ourselves if translator doesn't */
 	if(e->xkey.state&ControlMask && k != Kalt && k != Kctl)
-		k &= 0x9f;
+		if(k < 0x80)
+			k &= 0x1f;
 	if(k == NoSymbol)
 		return;
 	altdown = e->xany.type == KeyPress && k == Kalt;