Path: utzoo!attcan!uunet!mcvax!unido!rmi!infoac!infohh!shimoda From: shimoda@infohh.rmi.de (Markus Schmidt) Newsgroups: comp.sys.amiga.tech Subject: Re: Non-blocking keyboard reads Message-ID: <475@infohh.rmi.de> Date: 19 Jan 89 10:20:44 GMT References: <1004@husc6.harvard.edu> Reply-To: shimoda@infohh.rmi.de (Markus Schmidt) Organization: RMI Net * Aachen/Hamburg/Flensburg * W.Germany Lines: 25 In article <1004@husc6.harvard.edu> wen@husc4.UUCP (A. Wen) writes: >That is, if I am waiting for the timer to wake me up, but I need to be notified >of any keystrokes that may occur in the meantime, is there anything simple >(short of busy-waiting) that I can do? Create a Port an d IOtwio Create a port and two messages for the port. Use one of the messages for the timer.device, the other for the console.device (creating both messages for the one port). The WaitPort(yourPort) and see what arrived: msg= GetMsg(yourPort); if (msg==timerMsg) { ... timer stuff ... } else if (msg==consoleMsg) { ... keystuff ... } else { ... curse and wait for another message ... } Cu Markus