Capture keyboard input?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jamesd0142
    Contributor
    • Sep 2007
    • 471

    Capture keyboard input?

    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
  • fahadqureshi
    New Member
    • Oct 2007
    • 28

    #2
    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.

    Comment

    • jamesd0142
      Contributor
      • Sep 2007
      • 471

      #3
      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

      :)

      Comment

      • Killer42
        Recognized Expert Expert
        • Oct 2006
        • 8429

        #4
        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.

        Comment

        • vbcoder77
          New Member
          • Oct 2007
          • 1

          #5
          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.

          Comment

          • Robert Gates
            New Member
            • Mar 2009
            • 1

            #6
            Did you find a solution?

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

            Comment

            Working...