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

javascript - Iterate over array and calculate average values of array-parts -

iphone - Using nested NSDictionary with Picker -

objective c - Newbie question -multiple parameters -