🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Simple little question...

#15975
From: Chris
Date: Thu, 05 Jun 2003 22:48
26 lines
2177 bytes
For example, when the user (of my program..) presses a hotkey, I retrieve
the clipboard, make a clone of it, put other data on the clipboard, then
tell the program they pressed the hotkey in to paste.
For example, Ctrl-Alt-V is the hotkey to paste like this.
I need to lift up Ctrl
lift up Alt
lift up V
put down Ctrl
Down V
Up ctrl
Up V
by the end of this, I need to put the Ctrl and Alt keys back down, so the
user can press it again if they want, or another hotkey, or something else,
without having to lift the keys up once more.
If I try and record the state of the keys before I start this, many times it
puts the keys down when they are physically up on their keyboard, causing
problems.

I'm asking if the playback hook will or won't effect GetAsyncKeyState,
because if it won't, then I can just use that, no problem at all, the keys
should even return to normal anyway.

I basically need a way to trick a program into thinking a key has been
pressed without actually effecting the system's keyboard even in a virtual
manner. Like isuing a keyup or keydown message to it...
I've tried quite a few hours of many days to get this working...
Technical Details
Message-ID: <3edfc8c5$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3ede7291$1@newsgroups.borland.com> <3ede97fb$1@newsgroups.borland.com> <3edf7813$1@newsgroups.borland.com> <3edf7b6c@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,a1c6ebdccf17b6f9
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-06-05 15:51:31 PST
From: "Chris" <Chris8852@adelphia.net>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3ede7291$1@newsgroups.borland.com> <3ede97fb$1@newsgroups.borland.com> <3edf7813$1@newsgroups.borland.com> <3edf7b6c@newsgroups.borland.com>
Subject: Re: Simple little question...
Date: Thu, 5 Jun 2003 18:48:35 -0400
Lines: 28
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 68.65.164.124
Message-ID: <3edfc8c5$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1054853317 68.65.164.124 (5 Jun 2003 15:48:37 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail