shithub: patch

Download patch

ref: ea968382f53acf6bd2db65a38eeed59bfdd10ee8
parent: 14948975d1e2fc945c8068e4319f4ca5d30051b4
author: qwx <qwx@sciops.net>
date: Mon Jul 31 00:45:52 EDT 2023

add riow-skip-redundan: skip redundant k event

immediately followed by a c event; this fixes leaking the
key combo with mod+number or others, for instance when a
vnc window is in focus. unshifted, the following c event
will be identicaly as the k one

--- /dev/null
+++ b/riow-skip-redundant
@@ -1,0 +1,13 @@
+diff 06c482ecc7e168719718ba8e853261265b4a3cbd uncommitted
+--- a//sys/src/cmd/riow.c
++++ b//sys/src/cmd/riow.c
+@@ -377,6 +371,9 @@
+ 			return 0;
+ 		}
+ 	}
++	/* skip redundant event */
++	if(c == 'k' && (mod & Mshift) == 0)
++		return 0;
+ 	/* mod4 + shift + 1…0 yields a shifted value on 'c': workaround */
+ 	if(c == 'k' && mod == (Mmod4|Mshift) && r >= '0' && r <= '9'){
+ 		vdaction(r - '0');