Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Capturing all Keyboard input using a DLL

Capturing all Keyboard input using a DLL

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++designsysadminhardware
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Don Guy
    wrote on last edited by
    #1

    Hey there, I have a C++ WIN32 DLL that acts as a server for a UI. Now i want to capture all keyboard inputs in the PC on the WIN32 dll, whenever the UI has active focus. If the user is typing something into another app, i don't care. The trick is that, the keyboard can be both a software keyboard or a hardware keyboard. I want to be able to capture every keyboard input from the user on the PC in which the UI and DLL is running. I would ideally like to get a little deeper on the Windows operating system level to do this. Rather than using WM_CHAR or something like that. Is this possible to do? How can i implement this? Any sample code will help. Thanks in advance.

    J R V 3 Replies Last reply
    0
    • D Don Guy

      Hey there, I have a C++ WIN32 DLL that acts as a server for a UI. Now i want to capture all keyboard inputs in the PC on the WIN32 dll, whenever the UI has active focus. If the user is typing something into another app, i don't care. The trick is that, the keyboard can be both a software keyboard or a hardware keyboard. I want to be able to capture every keyboard input from the user on the PC in which the UI and DLL is running. I would ideally like to get a little deeper on the Windows operating system level to do this. Rather than using WM_CHAR or something like that. Is this possible to do? How can i implement this? Any sample code will help. Thanks in advance.

      J Offline
      J Offline
      jeron1
      wrote on last edited by
      #2

      This[^] or this[^] could be a start, I'm sure there are plenty of others out there.

      1 Reply Last reply
      0
      • D Don Guy

        Hey there, I have a C++ WIN32 DLL that acts as a server for a UI. Now i want to capture all keyboard inputs in the PC on the WIN32 dll, whenever the UI has active focus. If the user is typing something into another app, i don't care. The trick is that, the keyboard can be both a software keyboard or a hardware keyboard. I want to be able to capture every keyboard input from the user on the PC in which the UI and DLL is running. I would ideally like to get a little deeper on the Windows operating system level to do this. Rather than using WM_CHAR or something like that. Is this possible to do? How can i implement this? Any sample code will help. Thanks in advance.

        R Offline
        R Offline
        rashin ghodratzade
        wrote on last edited by
        #3

        First I tried using kbhit() and getch() to recognize and capture the users input. I call the code below every frame (I tested in BL:R) but nothing happens. PHP Code if(kbhit())content += getch();

        1 Reply Last reply
        0
        • D Don Guy

          Hey there, I have a C++ WIN32 DLL that acts as a server for a UI. Now i want to capture all keyboard inputs in the PC on the WIN32 dll, whenever the UI has active focus. If the user is typing something into another app, i don't care. The trick is that, the keyboard can be both a software keyboard or a hardware keyboard. I want to be able to capture every keyboard input from the user on the PC in which the UI and DLL is running. I would ideally like to get a little deeper on the Windows operating system level to do this. Rather than using WM_CHAR or something like that. Is this possible to do? How can i implement this? Any sample code will help. Thanks in advance.

          V Offline
          V Offline
          vijith squadz
          wrote on last edited by
          #4

          Try Keyboard Hooking

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups