Essentially I want to record every key press (including keydown/keyup and mouse clicks) and when they occurred so that I can create a macro out of them.
I found a ton of stuff about key presses and WinForms or WPF, but I don't really need a GUI, I just want to dump it out to the console after I'm done processing it.
So how can I record all key presses, even when my 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 for now, but the input text field has to be focused. I'd rather be able to record the keystrokes while I'm in my game, hence the question :)