🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

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

#1029
From: Asger Jørgensen
Date: Mon, 05 Nov 2007 18:02
33 lines
1969 bytes
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: <MPG.2199791d4a8fd91698988e@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <471ee221$1@newsgroups.borland.com> <472e9911@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-7-bit
From: Asger Jørgensen <junk@Asger-P.dk>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: How can keyboard know that the key "Shift + Right Arrow"are pressed as the same time?
Date: Mon, 5 Nov 2007 19:02:25 +0100
Message-ID: <MPG.2199791d4a8fd91698988e@newsgroups.borland.com>
References: <471ee221$1@newsgroups.borland.com> <472e9911@newsgroups.borland.com>
Organization: Asger-P
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
User-Agent: MicroPlanet-Gravity/2.70.2067
NNTP-Posting-Host: 83.73.201.25
X-Trace: newsgroups.borland.com 1194285743 83.73.201.25 (5 Nov 2007 10:02:23 -0700)
Lines: 33
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail