From mboxrd@z Thu Jan 1 00:00:00 1970 From: rsc@plan9.bell-labs.com Message-Id: <200006171920.PAA24574@cse.psu.edu> To: 9fans@cse.psu.edu Subject: Re: [9fans] input methods, how? Date: Sat, 17 Jun 2000 15:20:30 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: c2a3cbf2-eac8-11e9-9e20-41e7f4b1d025 I need to eat keystrokes until I've got enough to form a character (or an error), then deliver the composite character to the focused application. Q: Is there some way I can use namespaces or something to just filter what is read from /dev/console (not replace that service altogether, hopefully). So I want to stack a "stream filter" on top of /dev/console (just for reading), I think. Is there any such thing? Sure. If you require that rio be run on top of it, then you can make it very simple; in particular you wouldn't need to worry about writes to /dev/cons or about flush messages. Just take characters as they come in from the real /dev/cons repackage them, and use them to satisfy read requests. Two procs working side-by-side would work quite well. Have a look at /sys/src/cmd/authfs.c, which is probably close to what you would need (ignore all the weird authentication code at the top). Russ