Article View: borland.public.cppbuilder.nativeapi
Article #7408Re: About Keyboard hooking & KBDLLHOOKSTRUCT
From: Bob Gonder
Date: Thu, 03 Feb 2005 17:48
Date: Thu, 03 Feb 2005 17:48
26 lines
1677 bytes
1677 bytes
Vladimir Stefanovic wrote: >Can someone please interpret me something about Keyboard >Hooking. When I press a key, is it true that the structure >KBDLLHOOKSTRUCT saved also the modifier (Alt, Shift, ...) >state? I need this because I want to SendMessage() to the >main app only when, for example Alt is pressed also. See the subject: KeyboardProc() in WIN32.HLP. >What means 'return 1', It tells Windows to drop the message. If you return 0, then Windows will pass the key to the target window. > and is there a way to extend my code (below) >to work with checking for Alt? Check bit 29 (zero-based) of lparam. 1 == Alt if ( lParam & (1<<29) ) ItIsAnAlt=true;
Technical Details
Message-ID:
<0do401dejfcqd60m486gdd08eii7ruibkr@4ax.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!proxad.net!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<42021449@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,8625c090d856cce0 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: About Keyboard hooking & KBDLLHOOKSTRUCT Date: Thu, 03 Feb 2005 09:48:28 -0800 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <0do401dejfcqd60m486gdd08eii7ruibkr@4ax.com> References: <42021449@newsgroups.borland.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 69.69.90.62 X-Trace: newsgroups.borland.com 1107452907 69.69.90.62 (3 Feb 2005 09:48:27 -0800) Lines: 29 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!proxad.net!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail