🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: How can keyboard know that the key "Shift + Right Arrow"are pressed as the same time?

#1030
From: Emmanuel
Date: Tue, 06 Nov 2007 01:51
41 lines
2223 bytes
: (
I can hear a beep;
but It still cannot select text by the code, I can only select text by 
typing arrow

I am using Windows XP Simple Chinese , C++builder 6

"Asger J?rgensen" <junk@Asger-P.dk> д����Ϣ����:MPG.2199791d4a8fd91698988e@newsgroups.borland.com...
>
> Hi Emmanuel
>
> In article <472e9911@newsgroups.borland.com>
> emmanuel@erphk.com
> Emmanuel says:
>> No any idea?
>
> I don't know how to fix it, but Your theori about
> what is going on is wrong.
>
>   keybd_event(VK_SHIFT, 0, 0,0);
>   keybd_event(VK_RIGHT, 0, 0,0);
>   keybd_event(VK_RIGHT, 0, KEYEVENTF_KEYUP,0);
>   Application->ProcessMessages();
>   Sleep(500);
>   keybd_event(VK_RIGHT, 0, 0,0);
>   keybd_event(VK_RIGHT, 0, KEYEVENTF_KEYUP,0);
>   Application->ProcessMessages();
>   Sleep(500);
>   if (GetAsyncKeyState(VK_SHIFT)&0x8000)
>      Beep(400,100);
>   //keybd_event(VK_SHIFT, 0, KEYEVENTF_KEYUP,0);
>
> if You run this code You will hear a beep and You will
> see that the text will be selected if You press the right
> arrow on the keyboard, so the shiftkey is down.
> Why it doen't select the text when You aoutgenerate the
> the right arrow keypress i don't know.
>
> Kind regards
> Asger
> 
Technical Details
Message-ID: <472fc864$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <471ee221$1@newsgroups.borland.com> <472e9911@newsgroups.borland.com> <MPG.2199791d4a8fd91698988e@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,ef6263e7ebba8223
X-Google-Attributes: gid10cc67,public,usenet
X-Google-Language: ENGLISH,ASCII
From: "Emmanuel" <emmanuel@erphk.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <471ee221$1@newsgroups.borland.com> <472e9911@newsgroups.borland.com> <MPG.2199791d4a8fd91698988e@newsgroups.borland.com>
Subject: Re: How can keyboard know that the key "Shift + Right Arrow"are pressed as the same time?
Date: Tue, 6 Nov 2007 09:51:57 +0800
Lines: 43
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 58.60.28.95
Message-ID: <472fc864$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1194313828 58.60.28.95 (5 Nov 2007 17:50:28 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail