From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <8d670231ccf253e2927478ede455ee39@plan9.bell-labs.com> To: 9fans@cse.psu.edu Subject: Re: [9fans] events From: "Russ Cox" In-Reply-To: <6ab179dcbf4c6ece11328ca41724fed2@plan9.escet.urjc.es> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Wed, 19 Feb 2003 08:56:47 -0500 Topicbox-Message-UUID: 68f8be70-eacb-11e9-9e20-41e7f4b1d025 > I am trying to do this Inkey is 4. Stdin is 0. I have noticed two things > 1) einit ignores keys others than Emouse and Ekeyboard (I noticed this looking at sources) That's okay -- the other keys have been started with estart. Einit just needs to start the mouse and the keyboard. > 2) I don't get the stdin events. Something for us is never printed. Are you reading from a file? Usually stdin is the console but the keyboard will get at least half those events instead. Also, case Inkey: print("something for us..."); readn(Stdin,msg,1); this is wrong. The data has already been read and is in gev.data. Event != select. Reading one byte at a time seems like a recipe for trouble anyway, especially if UTF is involved. Russ