Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!cica!sol.ctr.columbia.edu!emory!hubcap!ncrcae!usceast!jwwalker From: jwwalker@usceast.UUCP (Jim Walker) Newsgroups: comp.sys.mac.programmer Subject: Re: ThinkC / ANSI / scanf question... Keywords: scanf THINK C console Message-ID: <3236@usceast.UUCP> Date: 2 May 90 20:47:21 GMT References: <79695@tut.cis.ohio-state.edu> <14833@reed.UUCP> <3226@usceast.UUCP> <14851@reed.UUCP> <691@nada.cs.utexas.edu> Distribution: usa Organization: University of South Carolina, Columbia Lines: 24 In article <691@nada.cs.utexas.edu> ted@cs.utexas.edu (Ted Woodward) writes: [stuff deleted] >I'd really like to be able to use printf and keydowns at the same time! >I had to play around with DrawChar... Here is some code posted to CompuServe by Philip Keller that will prevent the console from intercepting keyboard events. I don't claim to understand it, but it works. | The fix is also pretty obvious: nuke the driver's event mask to | disregard all keyboard events, and your application gets to | handle them instead of the driver. | Here's a code fragment to demonstrate the fix: | DCtlHandle dceH; | tty = fopenc (); | dceH = UTableBase [~ ((WindowPeek) tty->window)->windowKind]; | (**dceH).dCtlEMask &= 0xFFC7; Oh, I do know that you can use something like stdout in place of tty here. -- Jim Walker jwwalker@usceast.cs.scarolina.edu 76367.2271@compuserve.com