Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.

ID: 23352, Windows Keyboard Event Notification

by dean sellers Email: Anonymous

Uses SetWindowsHook API to fire event when user setable keys change state. Demonstrates using SetWindowsHook.
Download Details
FTP  download also available
CDN Login Required to Download. (You will be redirected to the login page if you click on the Download Link)
To download this, you must have registered:
A free membership

For Delphi, Version 5.0  to 5.0 409 downloads
Copyright: No significant restrictions

Terms of use: Embarcadero use at your own risk disclaimer

Size: 165,900 bytes
Updated on Tue, 28 Jun 2005 21:21:58 GMT
Originally uploaded on Tue, 28 Jun 2005 21:25:27 GMT
SHA1 Hash: BB465468FD8B60AEB2B7430CE2F139581F99CD2A
MD5 Hash: C45D7F73A55AFC6A395B51E202E6F47E

    Explore the files in this upload

Handy for use in non-visual components or when you want to change a control that doesn't have focus based on keyboard events. Will not impact on normal keyboard handling.
I wrote it to use in a frame (no key events) to change a button caption and function when the control key is down. Add the virtual keycode(s) you are interested in watching and provide a method pointer and you are away.
Hopefully the demo app is explaination enough. Since it just uses API calls it should work with most versions of Delphi but I still use 5 so that is all I've tested on.
Credits: The functions in BitTools.pas are not mine, I downloaded them from Code Central ID:19824 and added the function exports to the interface section. (These are some of the handiest little functions I've used from here, nice work!)

   Latest Comments  View All Add New

Move mouse over comment to see the full text

Could not retrieve comments. Please try again later.

Server Response from: ETNACDC03