kbdfs: disable console processing if /dev/kbd is open

This commit is contained in:
cinap_lenrek 2011-05-27 00:41:58 +00:00
parent f9f94d0b52
commit c266a31572
2 changed files with 11 additions and 2 deletions

View 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

View 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;