diff --git a/Event-handlers.md b/Event-handlers.md index f7de697..4e166ca 100644 --- a/Event-handlers.md +++ b/Event-handlers.md @@ -1 +1,5 @@ -Empty. \ No newline at end of file +Imagine event handlers as callbacks that are invoked when TFW receives a specific type of message. For instance, you could send a message to the framework when the user does something of note. They are subscribed to a specific set of keys and messages are forwarded to them when one of their keys is the prefix of the one in the message. + +Event handlers allow you to define actions triggered on the backend when the user presses a button on the frontend or moves the cursor to a specific area, etc. + +They use **ZeroMQ** to connect to the framework. Due to this they are as loosely-coupled as possible: usually they are running in separate processes and only communicate with TFW through ZMQ. \ No newline at end of file