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.
Why don't you use `ws_object_new()` here, it does the settings setting for you and you can allocate as much memory as you want for the object...