Re: Kernel compile fixes

Miod Vallat <[email protected]> Wed, 7 Jul 2004 14:36:24 +0000
Newsgroups gmane.os.openbsd.vax,gmane.os.openbsd.tech
Message-ID <[email protected]>
> The second is a patch for wskbd.c, and it exists in NetBSD too. I believe
> it must be there. Without this, LK401 keypresses repeat forever on my VS4k/VLC.

You got infinite repeats because lk201 feeds WSCONS_EVENT_ALL_KEYS_UP
for every released key.

Does applying the crude diff below, rather than the one you posted, fix
the problem as well? If so, I'll have a better diff for this...

Miod

Index: wskbd.c
===================================================================
RCS file: /cvs/src/sys/dev/wscons/wskbd.c,v
retrieving revision 1.41
diff -u -p -r1.41 wskbd.c
--- wskbd.c	2004/06/24 19:35:24	1.41
+++ wskbd.c	2004/07/07 14:33:50
@@ -1480,6 +1480,12 @@ wskbd_translate(id, type, value)
 				| MOD_META_L | MOD_META_R
 				| MOD_MODESHIFT | MOD_MODELOCK
 				| MOD_COMMAND | MOD_COMMAND1 | MOD_COMMAND2);
+#if NWSDISPLAY > 0
+		if (sc != NULL && sc->sc_repeating) {
+			sc->sc_repeating = 0;
+			timeout_del(&sc->sc_repeat_ch);
+		}
+#endif
 		update_leds(id);
 		return (0);
 	}