Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!convex!news From: tchrist@convex.COM (Tom Christiansen) Newsgroups: comp.unix.programmer Subject: Re: /dev/kbd, keystroke access Message-ID: <1991Feb20.002933.27325@convex.com> Date: 20 Feb 91 00:29:33 GMT References: Sender: news@convex.com (news access account) Reply-To: tchrist@convex.COM (Tom Christiansen) Distribution: usa Organization: CONVEX Software Development, Richardson, TX Lines: 31 Nntp-Posting-Host: pixel.convex.com From the keyboard of nieters@crd.ge.com: : :hi : i have been RTFM'ing for long enough! time to post .... :-) Did you consider RTFFAQ? :the problem: : i want to write a program which will tell me if : a key has been pressed on the keyboard. i don't want to : intercept the key or modify it, i just want to catch the : "interrupt" and count it. ideally a blocking ioctl() or : equivalent would be best but i can sit in a busy loop and : poll until i see a key stroke, increment a counter, and continue. Unless you care whether they have hit a shift but no real character has actually been answered, this is way too much work. See the following FAQs (by question number) for further details: Group Q# comp.unix.questions 7 comp.lang.c 64 comp.lang.perl 16 --tom -- Tom Christiansen tchrist@convex.com convex!tchrist "All things are possible, but not all expedient." (in life, UNIX, and perl)