The communication between the cluster master and clients is generally a one-way communication (i.e. the master sends commands to the clients to execute). However, there is limited functionality to have clients notify the master of certain input events (e.g. mouse, keyboard).
Cluster clients are capable of notifying the master of the following input events:
Cluster client events |
To register a callback for a cluster client event, you must use the <viz>.callback command, and specify the cluster mask through the optional mask parameter. When the event is triggered on any of the specified client machines, the registered function will be called. You can determine which client triggered the event within the callback by using the <viz:cluster>.getClient command.
Here is an example that allows each client machine to change the background color by pressing the '1', '2', or '3' key: