c# - How to record keys pressed? -


essentially want record every key press (including keydown/keyup , mouse clicks) , when occurred can create macro out of them.

i found ton of stuff key presses , winforms or wpf, don't need gui, want dump out console after i'm done processing it.

so how can record key presses, when console window doesn't have focus?


sample output:

send {q down} sleep 98 send {q up} sleep 4 send {f down} sleep 102 send {f up} sleep 43 send {a down} sleep 26 send {s down} sleep 111 send {a up} sleep 18 send {s up} sleep 17 send {a down} sleep 62 send {space down} sleep 72 send {a up} sleep 5 send {space up} 

using wpf now, input text field has focused. i'd rather able record keystrokes while i'm in game, hence question :)

have @ setwindowshookex function. can used monitor keystrokes across system.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -