Connecting Tech Pros Worldwide Forums | Help | Site Map

Capture keyboard input?

jamesd0142's Avatar
Needs Regular Fix
 
Join Date: Sep 2007
Location: Wales
Posts: 467
#1: Oct 10 '07
hi guys i want to create a form which runs in the background which is not visible... so far so good...

now... how can i get it to capture all keyboard input, so that i can say if f10 is pressed start word etc...

i can do this using the form.keypress method when the form is selected.

But i want to capture all keyboard input when the form is not selected so if a user(me) was browsing the web, and pressed f10 it wud still start word...

is this possible?

Thanks

Newbie
 
Join Date: Oct 2007
Posts: 28
#2: Oct 10 '07

re: Capture keyboard input?


Not sure why you want to write a program to do this but i think an easy solution would be to just download a program from the internet that does all these things. There are many available programs that will track all input on the keyboard and also there are programs available that can assign programs to certain keys or key combinations.
one good program that records keyboard input and is free to use is Family Keylogger. just do a search in google for "Family Keylogger". this program can also run hidden/revealed mode by pressing a combination of keys for example Ctrl+Alt+Shift+F or any combination you want.

Hope this helps.
jamesd0142's Avatar
Needs Regular Fix
 
Join Date: Sep 2007
Location: Wales
Posts: 467
#3: Oct 10 '07

re: Capture keyboard input?


Yes thanks for that, no real usefull reason why i want to do this, other than gaining the knowledge on how its done.

I don't know about you but every time i run/use a program i start thinking in code (vb :)) as to how each step is done. and it annoys me when i don't know

:)
Moderator
 
Join Date: Oct 2006
Location: Australia
Posts: 7,748
#4: Oct 10 '07

re: Capture keyboard input?


This kind of program is known as a keylogger, and they are a favourite of hackers. Most of us spend considerable money and time trying to keep such things out of our systems, and we at TheScripts do not condone their creation or use.

Please refrain from asking about them here.


Besides, Windows already allows you to assign hotkeys to start or switch-to particular applications. You don't need a separate program to handle it.
Newbie
 
Join Date: Oct 2007
Posts: 1
#5: Oct 29 '07

re: Capture keyboard input?


There are plenty of legitimate reasons to capture keyboard data. I'm working on a project right now that is a perfect example. I'm working on a point of sale application that uses a barcode scanner that communicates to the OS as a USB keyboard device.

One way to capture keyboard data is to use the Windows API to set a global or application specific keyboard hook. There is nothing hacker-like about this. The API methods required are publicly documented and for good reason.

My problem is that a keyboard hook is not an ideal solution because I can't figure out how to tell which keyboard device is generating the data using this approach. Normal keystrokes coming from the keyboard look just like data coming from the barcode scanner.

Ideally, I'd like a solution that lets me capture data from the scanner and keep the current active application from seeing the data. If I can't accomplish this, scanned barcode data will show up in notepad, word, or whatever application currently is active.

Perhaps there is a way to do this with a global or application specific hook. I'm going to keep researching this. If anyone has experience with this sort of project or any suggestions I'd love to hear them.
Newbie
 
Join Date: Mar 2009
Posts: 1
#6: Mar 6 '09

re: Capture keyboard input?


We have a similar need. Did you find a solution?
Reply