Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!cs.utexas.edu!sun-barr!newstop!sun!stpeter!cmcmanis From: cmcmanis@stpeter.Sun.COM (Chuck McManis) Newsgroups: comp.sys.amiga.tech Subject: Re: Reading the keyboard without a window. Keywords: keyboard,read,easy? Message-ID: <131451@sun.Eng.Sun.COM> Date: 8 Feb 90 17:23:18 GMT References: <6675@ucdavis.ucdavis.edu> Sender: news@sun.Eng.Sun.COM Reply-To: cmcmanis@sun.UUCP (Chuck McManis) Organization: Sun Microsystems, Mountain View Lines: 33 In article <6675@ucdavis.ucdavis.edu> (Brewski Rogers) writes: >For a game I am working on, I need to be able to read the keyboard >without having a window open... If you open a SIMPLE_REFRESH + BORDERLESS + BACKDROP + NOCAREREFRESH (no I'm not screaming) on the screen you can have intuition send you keyboard events through it. This takes very little overhead to do. If you are morally opposed to this method .. > ... I already have a routine that intercepts input events before > intuition sees them, but before I write down the code and qualifier > for each key, I'd like to know if there is an easier way, or if > someone has already written it. Yes, look up RawKeyConvert/DeadKeyConvert in the new ROM Kernel manual. It shows how you can take the input events that the input device is sending you and convert them into real keys. The will also make sure that when you get 'z' it will be the 'z' key on a US as well as on a German keyboard. > While the game DOES multitask, > the current interface with intuition is a total kludge, and we are trying > to make it cleaner/more reliable. Sometimes it is useful to have intuition just provide the input for you, in which case the borderless backdrop approach works well. It doesn't take up hardly any memory (just the sizeof(struct Window)). --Chuck McManis uucp: {anywhere}!sun!cmcmanis BIX: cmcmanis ARPAnet: cmcmanis@Eng.Sun.COM These opinions are my own and no one elses, but you knew that didn't you. "If it didn't have bones in it, it wouldn't be crunchy now would it?!"