Path: utzoo!attcan!uunet!lll-winken!ames!mailrus!csd4.milw.wisc.edu!nic.MR.NET!umn-d-ub!rutgers!cbmvax!jesup From: jesup@cbmvax.UUCP (Randell Jesup) Newsgroups: comp.sys.amiga.tech Subject: Re: Non-blocking keyboard reads Message-ID: <5716@cbmvax.UUCP> Date: 18 Jan 89 04:28:46 GMT References: <1004@husc6.harvard.edu> Reply-To: jesup@cbmvax.UUCP (Randell Jesup) Organization: Commodore Technology, West Chester, PA Lines: 15 In article <1004@husc6.harvard.edu> wen@husc4.UUCP (A. Wen) writes: >I've been mulling over ways to do non-blocking keyboard reads without >polling the keyboard; is there any way that I can be signalled when the >console device has input available short of creating a new task to block >for input and then signal its parent process? Well, if you want the console.device (as opposed to RAWKEYS or VANILLAKEYS), a seperate task is probably the way to go. The only other way is to do asynch io, and use the signal bit of the replyport to know when a read has completed. (Use SendIO or BeginIO, then when you get the signal, check the message with CheckIO, and if it completed use WaitIO (which will remove it from the port) or GetMsg(port) if no other messages use that port). -- Randell Jesup, Commodore Engineering {uunet|rutgers|allegra}!cbmvax!jesup