How to Track Keypress

Discussion in 'Windows 7 Help and Support' started by MishaShapo, Mar 10, 2016.

  1. MishaShapo

    MishaShapo New Member

    Joined:
    Mar 10, 2016
    Messages:
    3
    Likes Received:
    0
    I want to be able to see all the programs that have "keyListeners" actively running. So if I press Escape, I want to see all the programs running on my computer (or really just the active window) and the specific file that handles that input and then does something (for instance which file in a program makes a player character jump when I press the spacebar).

    Is there a utility that can help me with this?

    Thank you. :)
     
  2. Neemobeer

    Neemobeer Windows Forum Team
    Staff Member

    Joined:
    Jul 4, 2015
    Messages:
    2,425
    Likes Received:
    366
    Well keyboard input is handled by the Windows Kernel and there is no special key listener. The active program that has focus will receive keyboard input. There are ways to program keyboard hooks that can intercept the keyboard input while any program has focus. As to "specific file that handles input" not sure what you mean exactly. Typically what a given key that does something such as makes your character jump in the game is programmed into the exe that you launch that is the game. There isn't typically separate files for it
     
  3. MishaShapo

    MishaShapo New Member

    Joined:
    Mar 10, 2016
    Messages:
    3
    Likes Received:
    0
    I see. Thank you for letting me know that there is no special key listener. I did some more research and figured out that exe's are compiled/optimized into Assembly code, so unless I want to dig in that (which I don't), I will have to find another way to finish my project.
     
  4. Neemobeer

    Neemobeer Windows Forum Team
    Staff Member

    Joined:
    Jul 4, 2015
    Messages:
    2,425
    Likes Received:
    366
    What exactly are you trying to do for your project?
     
  5. MishaShapo

    MishaShapo New Member

    Joined:
    Mar 10, 2016
    Messages:
    3
    Likes Received:
    0
    Well, I wanted to add custom key bindings to several of my programs, but I guess I will have to make do without it. Perhaps something like AutoHotKey will suffice.
     
  6. Neemobeer

    Neemobeer Windows Forum Team
    Staff Member

    Joined:
    Jul 4, 2015
    Messages:
    2,425
    Likes Received:
    366
    That's probably going to be your best bet. You would need to write a keyboard hook and depending upon which application catch your key press or combo and then alter the keys to the desired keys preprocess (before the application gets the key press)
     

Share This Page

Loading...