Add input event DAG

This PR adds code for hotkey recognition and event emission.
Still WIP, but you can review the code that is present now.
Targets #321.
It's __4 fucking lines__. A programmer who can't figure this out shouldn't touch it in the first place.