MouseSpeak

Let your mouse do the talking by transmitting your movements and text messages from multiple devices in realtime with PubNub!

Mouse Events

Through simple tracking of the mouse position, we can get the coordinates and broadcast the location over PubNub to any other viewers. We can also listen for keystrokes to broadcast the text changes along with the mouse position coordinates.

Mouse Events
Send Coordinates

With PubNub, it's simple to send arbitrary data in realtime, including screen coordinates. In this example, we can send JSON objects containing the x- and y- coordinates of a mouse position within a publish() call.

Don't forget to use your own publish and subscribe keys when initializing PubNub! If you don’t have one yet, sign up now to get your own unique keys!

Display Occupancy

You can also display the number of users online with our Presence Detection API. presence() receives user events including Join/Leave status changes. To use this optional API, you need to enable the feature on your Admin Dashboard and add the lines to your subscribe() call.

Features Used

Try PubNub Today