Xref: utzoo comp.unix.wizards:16832 comp.unix.questions:14175 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!srcsip!nic.MR.NET!hal!ncoast!allbery From: allbery@ncoast.ORG (Brandon S. Allbery) Newsgroups: comp.unix.wizards,comp.unix.questions Subject: Re: keyscan wanted Message-ID: <13734@ncoast.ORG> Date: 9 Jun 89 23:13:37 GMT References: <1006@twwells.uucp> <607@wn2.sci.kun.nl> Reply-To: allbery@ncoast.UUCP (Brandon S. Allbery) Followup-To: comp.unix.wizards Organization: Cleveland Public Access UN*X, Cleveland, Oh Lines: 32 As quoted from <607@wn2.sci.kun.nl> by medfys@wn2.sci.kun.nl (Victor Langeveld/Tjeerd Dijkstra): +--------------- | In article <1006@twwells.uucp>, bill@twwells.uucp (T. William Wells) | writes: | > In article <475@wn2.sci.kun.nl> medfys@wn2.sci.kun.nl (Victor Langeveld/Tjeerd Dijkstra) writes: | > : I am searching for a (small?) routine that informs me about a | > : possible pressed key. This routine should *not* wait for input, | > : but return immediately, wether succesfull or not. | > | > Yes. Tell us what hardware and OS you are talking about. | > | > For example, this should be doable on my system, a '386 running | > Microport's Unix, by telling the driver to return scan codes and (...) | > But on your system, who knows? We certainly don't, since we don't | > know the system. | | There is no need to know what hardware this should be working on. | Mr Charles Thayer (Thanks again, Charles!) gave me a perfect solution: | | return (select(1,&mask,0,0,&wait)); +--------------- BZZZZZZ! You lose. Select() is a BSD system call; Microport is System V, and for all you know Victor is running V7. (Anti-System-V flames to /dev/null.) ++Brandon -- Brandon S. Allbery, moderator of comp.sources.misc allbery@ncoast.org uunet!hal.cwru.edu!ncoast!allbery ncoast!allbery@hal.cwru.edu Send comp.sources.misc submissions to comp-sources-misc@ NCoast Public Access UN*X - (216) 781-6201, 300/1200/2400 baud, login: makeuser