How to Track Keypress

#1
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. :)
 


Neemobeer

Windows Forum Team
Staff member
#2
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
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.
 


Neemobeer

Windows Forum Team
Staff member
#4
What exactly are you trying to do for your project?
 


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


Neemobeer

Windows Forum Team
Staff member
#6
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)
 


This website is not affiliated, owned, or endorsed by Microsoft Corporation. It is a member of the Microsoft Partner Program.