shithub: riscv

Download patch

ref: ef310cbd28bc85ae3bace90b476c3e2fb0b15b0a
parent: 4780a7ff5673bd031fbc3302eba710ef379617cf
author: cinap_lenrek <[email protected]>
date: Mon Feb 13 02:21:59 EST 2012

kbdfs: mouse twitching

--- a/sys/src/cmd/aux/kbdfs/kbdfs.c
+++ b/sys/src/cmd/aux/kbdfs/kbdfs.c
@@ -394,15 +394,17 @@
 			rb[0] = 'k';
 		}
 		if(rb[0]){
-			if(key.r == Kshift && mctlfd >= 0){
-				if(key.down){
-					fprint(mctlfd, "buttonmap 132");
-				} else {
-					fprint(mctlfd, "swap");
-					fprint(mctlfd, "swap");
+			if(mctlfd >= 0){
+				if(key.r == Kshift){
+					if(key.down){
+						fprint(mctlfd, "buttonmap 132");
+					} else {
+						fprint(mctlfd, "swap");
+						fprint(mctlfd, "swap");
+					}
 				}
+				fprint(mctlfd, "twitch");
 			}
-
 			if(kbdopen){
 				s = utfconv(rb, nb+1);
 				if(nbsendp(kbdchan, s) <= 0)