Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!samsung!uunet!math.fu-berlin.de!fauern!faui43.informatik.uni-erlangen.de!csbrod From: csbrod@immd4.informatik.uni-erlangen.de (Claus Brod) Newsgroups: comp.sys.atari.st.tech Subject: Re: Simulating keypress Message-ID: <1991Apr8.130401.2682@informatik.uni-erlangen.de> Date: 8 Apr 91 13:04:01 GMT References: <1991Apr5.151946.25763@etek.chalmers.se> <1991Apr6.000637.20676@jato.jpl.nasa.gov> Organization: CSD., University of Erlangen, Germany Lines: 28 >In article <1991Apr5.151946.25763@etek.chalmers.se> fabian@etek.chalmers.se (Martin Fabian) writes: >> >>Is there any (legal) way to simulate a keypress from inside >>a program. Since the ikbdsys reads the keys directly off the >>UART, this seems like 'mission: impossible' to me. Any >>suggestions any one ? In a GEM program, use appl_tplay to simulate a keyboard event. In a TOS-only program, you might find it sufficient to manipulate the BIOS keyboard buffer accessible via some function (I forgot the name, sorry). The appl_tplay method, however, is cleaner and should be preferred. >I'd like to get hold of keypresses. It's easy to get hold of mouse >motions by inserting your own handler in place of the mousevec in >the struct returned by XBIOS' kbdvec function. But how do you get >hold of keypresses? Must you intercept the keyboard packet handler >and interpret all the packets? Alternatively, you can watch the BIOS keyboard buffer contents accessible by the abovementioned, still unnamed function 8-) ---------------------------------------------------------------------- Claus Brod, Am Felsenkeller 2, Things. Take. Time. D-8772 Marktheidenfeld, West Germany (Piet Hein) csbrod@medusa.informatik.uni-erlangen.de Claus Brod@wue.maus.de ----------------------------------------------------------------------