🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #14338

Re: Using GetAsyncKeyState() ?!!

#14338
From: Chris Hill
Date: Sun, 17 Aug 2003 10:25
16 lines
1414 bytes
On Sun, 17 Aug 2003 11:08:23 +0300, "Schandler"
<theslider@programmer.net> wrote:

>I want to use the api function GetAsyncKeyState (int vkey) to know if a
>specified key is down at the moment I'm calling the function
>the win32 api help says that the function detectes if the key is down if the
>"most significant bit is set" !! which I don't know what it means
>I tried to call the function to check if the Shift key is pressed on windows
>98 as follows

Try this:
int keydown = (GetAsyncKeyState(VK_SHIFT) < 0);


Chris Hill
Chris244@aol.com
Technical Details
Message-ID: <3f3f5610.3143789530@forums.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newsfeed.news2me.com!arclight.uoregon.edu!logbridge.uoregon.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <3f3f3635@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,64528418f36af68
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-08-17 03:51:47 PST
From: Chris244@aol.com (Chris Hill)
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Using GetAsyncKeyState() ?!!
Date: Sun, 17 Aug 2003 10:25:11 GMT
Message-ID: <3f3f5610.3143789530@forums.borland.com>
References: <3f3f3635@newsgroups.borland.com>
X-Newsreader: Forte Free Agent 1.21/32.243
NNTP-Posting-Host: 12.221.66.183
X-Trace: newsgroups.borland.com 1061115910 12.221.66.183 (17 Aug 2003 03:25:10 -0700)
Lines: 16
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newsfeed.news2me.com!arclight.uoregon.edu!logbridge.uoregon.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail