]> git.lizzy.rs Git - plan9front.git/commitdiff
kbdfs: disable console processing if /dev/kbd is open
authorcinap_lenrek <cinap_lenrek@localhost>
Fri, 27 May 2011 00:41:58 +0000 (00:41 +0000)
committercinap_lenrek <cinap_lenrek@localhost>
Fri, 27 May 2011 00:41:58 +0000 (00:41 +0000)
sys/man/8/kbdfs
sys/src/cmd/aux/kbdfs.c

index 7dc206afcc40bf0f73ff5cee7fe198db12e93d6a..7149cbd621a1f2d56000f5f6cc9ab6d9513738c2 100644 (file)
@@ -171,7 +171,11 @@ or
 .B Num
 will not change
 the characters already present in the string, but will
-take effect on newly pressed keys.
+take effect on newly pressed keys. Opening the
+.BR kbd
+file disables input processing on the
+.BR cons
+file until it is closed again.
 .PP
 Raw scancodes can be written to the
 .BR kbin
index c9eed2c0716fc39cebd58bd940a03e4383eb848e..1a0a0fa3dece75565ef117b04e277f5cc6d2379c 100644 (file)
@@ -605,7 +605,7 @@ ctlproc(void *)
                        break;
 
                case Araw:
-                       if(raw){
+                       if(raw || kbdopen){
                                s = emalloc9p(UTFmax+1);
                                s[runetochar(s, &r)] = 0;
                        } else {
@@ -620,6 +620,11 @@ ctlproc(void *)
                        e = s + strlen(s);
 
                Havereq:
+                       if(kbdopen){
+                               free(b);
+                               b = nil;
+                               break;
+                       }
                        while(b && (req = qcons.h)){
                                if((qcons.h = req->aux) == nil)
                                        qcons.t = &qcons.h;