shithub: riscv

Download patch

ref: 4c6c7be688eb2d74a28d3b9f4d1e1b487830ce78
parent: 506cae05df31f3e54992c99ab25ba53c72af49ad
author: cinap_lenrek <[email protected]>
date: Fri May 17 21:46:25 EDT 2013

nusb/kb: simplify repeat logic as scancode now contains the info about esc1 extension

--- a/sys/src/cmd/nusb/kb/kb.c
+++ b/sys/src/cmd/nusb/kb/kb.c
@@ -597,9 +597,7 @@
 			l = recvul(repeatc);
 			continue;
 		}
-		sc = l;
-		if((l>>8) != 0)
-			sc |= 0x80;
+		sc = l & 0xff;
 		t = Kbdelay;
 		if(alt(a) == 1){
 			t = Kbrepeat;
@@ -622,13 +620,7 @@
 static void
 startrepeat(KDev *f, uchar sc)
 {
-	ulong c;
-
-	if(isext(sc))
-		c = SCesc1 << 8 | (sc & 0xff);
-	else
-		c = sc;
-	sendul(f->repeatc, c);
+	sendul(f->repeatc, sc);
 }
 
 /*