Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!iuvax!cica!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!elroy.jpl.nasa.gov!ames!sgi!shinobu!odin!kj From: kj@sgi.com (Kenneth Josiah Harris) Newsgroups: comp.sys.sgi Subject: Re: qdevice and stuff......... Message-ID: <5858@odin.corp.sgi.com> Date: 29 Mar 90 20:03:59 GMT References: <1990Mar28.192724.26499@cunixf.cc.columbia.edu> Sender: news@odin.corp.sgi.com Organization: Silicon Graphics, Inc., Mountain View, CA Lines: 26 In article <1990Mar28.192724.26499@cunixf.cc.columbia.edu> kaul@cunixa.cc.columbia.edu (Anil Kaul) writes: >Hi, > I have been trying to queue certain keys on the keyboard, but have >come up with a strange error: > Whenever I press a key it seems to record two enteries in the event >queue. It appears that one entry is for key being depressed and the other >for the key while being released. Is it true or am I messing up somewhere else? >I would actually like to get only one entry everytime the key is depressed. >Is there something I can do to avoid getting two enteries from each key? > >Thanks, > >- Anil. > >email: kaul@ibm.com > kaul@yktvmx.bitnet > kaul@cunixa.cc.columbia.edu > You could queue the KEYBD device: qdevice(KEYBD); And then on "dev=qread(&val);", "dev" will be "KEYBD", and "val" will be the ASCII value of the character. -- Ken J. Harris -- kj@sgi.com or {decwrl,pyramid,ucbvax}!sgi!kj