Teen Programmers Unite  


Return to forum top

key logger c/c++

Posted by satish [send private reply] at April 22, 2002, 05:09:23 AM

Can I able to create a keyboard logger in either c or c++. While i am trying I can able to capture the keyboard interrupt and i can able to make that interrupt to call my user define function. Bow any body can let me know how to capture the keystroke.


Posted by buzgub [send private reply] at April 22, 2002, 05:18:36 AM

This is very much platform-dependent, so the way of doing it depends on if you're using Windows, or Linux, or some other Unix, or the Dynamo HotDogSlicerOS.

In Windows, I believe it's possible to get Windows to tell your program whenever an event occurs, for instance a key being pressed. Look up "hook" somewhere.

Hopefully someone who's actually done it before can provide some details.

Posted by vikram_1982 [send private reply] at April 22, 2002, 07:14:23 AM

try http://www.programmersheaven.com/

This site should help you find what u need.

Posted by Psion [send private reply] at April 22, 2002, 09:07:51 AM

An example for Windows can be found at:

You must be logged in to post messages and see which you have already read.

Log on
Save for later automatic logon

Register as a new user
Copyright TPU 2002. See the Credits and About TPU for more information.