Mouse input
Monitor mouse clicks, position and scroll.
- Send position to a Text source.
- Send clicks for mouse button 1, 2 and 3 to a Text source.
- Send horizontal and veritcal scroll to a Text source.
The mouse input values are passed to a Text source.
The User creates text sources to store and display incoming position, click and scroll values.
A text source is used because changes to a text source are easily observed by WebSocket clients. When a text source is updated an "InputSettingsChanged" event is sent to webSocket clients. See the Mouse Overlay Example tutorial for a complete example.

Setup
Install Python dependencies
This script uses the Pynput Library.
- Open the Terminal app
- Enter the
pipcommand
python3.11 -m pip install pynput
Add the Mouse Input Script to OBS
The "Mouse Input" script and accompanying OBS Collection can be found on Github.
python mouse input repo
Import the Mouse Input OBS Collection
- Download the Mouse input Collection
- In OBS, from the menu select
Scene Collection > Import - Import the collection
- Choose the collection
Scene Collection
Add the Script
- Download the Mouse Input Script
- In OBS, from the menu select
Tools > Scripts - Click the
+ Add scriptbutton
Configure Text Source
Choose Source
Check the mouse inputs to monitor.
