🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #607

Re: How to test for a key ALREADY pressed?

#607
From: Timo Salmi
Date: Tue, 07 Apr 1992 20:57
17 lines
1280 bytes
In article <rqjbpINNiqv@matt.ksu.ksu.edu> kentiler@matt.ksu.ksu.edu (Kent Iler) writes:
>Hello,
>   Is there a way to test to see if a key is already pressed.  Let say I run
>this program from the autoexec, and I want to see if the space bar is pressed.
>If it is I want to do one thing, if not I want to do another.  I don't want to
>wait there for a key to be pressed, just see if it already is.  I have C++ and
>Turbo Pascal to program with.  Thanks.

I am not sure how one can do it with normal keys, but the status of
the shift ctrl and alt keys are at a certain memory location (listed
in interrupt lists like Brown's).

...................................................................
Prof. Timo Salmi
Moderating at garbo.uwasa.fi anonymous ftp archives 128.214.87.1
School of Business Studies, University of Vaasa, SF-65101, Finland
Internet: ts@chyde.uwasa.fi Funet: gado::salmi Bitnet: salmi@finfun
Technical Details
Message-ID: <1992Apr7.205732.21831@uwasa.fi>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!news.funet.fi!uwasa.fi!ts
References: <rqjbpINNiqv@matt.ksu.ksu.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!news.funet.fi!uwasa.fi!ts
From: ts@uwasa.fi (Timo Salmi)
Newsgroups: comp.os.msdos.programmer
Subject: Re: How to test for a key ALREADY pressed?
Message-ID: <1992Apr7.205732.21831@uwasa.fi>
Date: 7 Apr 92 20:57:32 GMT
References: <rqjbpINNiqv@matt.ksu.ksu.edu>
Organization: University of Vaasa, Finland
Lines: 17