Article View: borland.public.cppbuilder.nativeapi
Article #12717Re: Simulating that a key has been pressed
From: Remy Lebeau (TeamB)
Date: Sun, 23 Nov 2003 08:01
Date: Sun, 23 Nov 2003 08:01
27 lines
1923 bytes
1923 bytes
"Feico" <feicorem0veth1s@gmx.net> wrote in message news:rpm0sv46b9pkgk9tsmjgs21htn6gqnm0jj@4ax.com... > I want to modify keyboard input. I hooked the keyboard and > my program gets control whenever a key is pressed. The problem > is now how to insert characters. You cannot "insert" new keystrokes in the middle of another keystroke from inside a hook, only monitor the keystrokes but not modify them. > The final result should be like a hardware device in the > keyboard cable, which modifies the input. For what you ask, you may have to write your own low-level keyboard driver to talk with the keyboard hardware directly, and issue keystrokes back to the rest of the system. > When I use GetForegroundWindow, SendMessage returnd error 183. That error makes no sense, that is ERROR_ALREADY_EXISTS, "Cannot create a file when that file already exists". What does your EXACT code look like? Gambit
Technical Details
Message-ID:
<3fc06850$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<2llvrv8g0ethuqm7b21760f21944k4qppp@4ax.com> <3fbff23d$1@newsgroups.borland.com> <rpm0sv46b9pkgk9tsmjgs21htn6gqnm0jj@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,c26082be79ed8ef8 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-11-23 00:09:02 PST From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <2llvrv8g0ethuqm7b21760f21944k4qppp@4ax.com> <3fbff23d$1@newsgroups.borland.com> <rpm0sv46b9pkgk9tsmjgs21htn6gqnm0jj@4ax.com> Subject: Re: Simulating that a key has been pressed Date: Sun, 23 Nov 2003 00:01:01 -0800 Lines: 29 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: 67.22.137.149 Message-ID: <3fc06850$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1069574224 67.22.137.149 (22 Nov 2003 23:57:04 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail