diff options
| author | cinap_lenrek <cinap_lenrek@localhost> | 2011-05-27 00:41:58 +0000 |
|---|---|---|
| committer | cinap_lenrek <cinap_lenrek@localhost> | 2011-05-27 00:41:58 +0000 |
| commit | c266a31572cdd704a5f9e9092e9447106e19d92c (patch) | |
| tree | 8dbbfa88ae20034b114c7744929dd265d5de3f34 | |
| parent | f9f94d0b52d867042ec57ef574cbe7c5221ed652 (diff) | |
| download | plan9front-c266a31572cdd704a5f9e9092e9447106e19d92c.tar.xz | |
kbdfs: disable console processing if /dev/kbd is open
| -rw-r--r-- | sys/man/8/kbdfs | 6 | ||||
| -rw-r--r-- | sys/src/cmd/aux/kbdfs.c | 7 |
2 files changed, 11 insertions, 2 deletions
diff --git a/sys/man/8/kbdfs b/sys/man/8/kbdfs index 7dc206afc..7149cbd62 100644 --- a/sys/man/8/kbdfs +++ b/sys/man/8/kbdfs @@ -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 diff --git a/sys/src/cmd/aux/kbdfs.c b/sys/src/cmd/aux/kbdfs.c index c9eed2c07..1a0a0fa3d 100644 --- a/sys/src/cmd/aux/kbdfs.c +++ b/sys/src/cmd/aux/kbdfs.c @@ -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; |
