🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.lang.basic
Article #40

Re: Easy way to trap all arrow keys?

#40
From: Phillip Cooper
Date: Thu, 06 Aug 1992 18:01
23 lines
1631 bytes
In article <BsIrHC.A78@acsu.buffalo.edu> millard@acsu.buffalo.edu (Peter G. Millard) writes:
>In quickbasic 4.5, is there an easy way to trap all of the arrow key 
>combinations? By this I mean, all the combinations when the Num-Lock and
>the Caps-Lock is down, for instance. Normally, this would entail constructing
>seperate user-defined keys, then trapping them. This would work, but in order
>to trap all of the combinations, there are not enough user definable keys
>left :)...
>
>Any help in this matter would be appreciated.
>
>-- 
There is no easy way to do this.  The only way to get this effect is to
set up a polling loop using the inkey$ function, and look at the extended
keycode returned by the arrow key.  The only problem is that you cannot
distinguish between the arrow key on the numeric keypad and the dedicated
arrow keys.  Normally, this would not be a problem because you would
expect both keys to behave identically anyway.  If you are a registered
QuickBasic owner, you can call our programming support line (900)896-9999
for example code on this process.  Alternatively, you can access the 
entire Microsoft knowledgebase on Compuserve by typing "Go MDKB" at
any prompt.  Query on "inkey$ trap quickbasic".

Phil Cooper
Technical Details
Message-ID: <1992Aug06.180110.16498@microsoft.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!microsoft!wingnut!philco
References: <BsIrHC.A78@acsu.buffalo.edu>

Show Full Headers
Complete Article Headers
Newsgroups: alt.lang.basic
Path: arc1-ca.pugleaf.net!sparky!uunet!microsoft!wingnut!philco
From: philco@microsoft.com (Phillip Cooper)
Subject: Re: Easy way to trap all arrow keys?
Message-ID: <1992Aug06.180110.16498@microsoft.com>
Date: 06 Aug 92 18:01:10 GMT
Organization: Microsoft Corporation
References: <BsIrHC.A78@acsu.buffalo.edu>
Keywords: arrow keys?
Lines: 24