From: "Russ Cox" <rsc@plan9.bell-labs.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] events
Date: Wed, 19 Feb 2003 08:56:47 -0500 [thread overview]
Message-ID: <8d670231ccf253e2927478ede455ee39@plan9.bell-labs.com> (raw)
In-Reply-To: <6ab179dcbf4c6ece11328ca41724fed2@plan9.escet.urjc.es>
> 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
next prev parent reply other threads:[~2003-02-19 13:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-19 13:23 paurea
2003-02-19 13:56 ` Russ Cox [this message]
2003-02-19 14:08 ` paurea
2003-02-19 14:13 ` Russ Cox
2003-02-19 14:31 ` paurea
2003-02-19 21:57 ` Russ Cox
2003-02-20 11:18 ` paurea
-- strict thread matches above, loose matches on Subject: below --
2003-02-19 13:20 paurea
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8d670231ccf253e2927478ede455ee39@plan9.bell-labs.com \
--to=rsc@plan9.bell-labs.com \
--cc=9fans@cse.psu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).