Turns a SteelSeries controller into a macOS mouse/scroll/drag controller using pygame, pyautogui and the native Quartz mouse events.
Highlights
- Low-latency mouse movement using Quartz native events
- Left-stick cursor movement with acceleration and deadzone
- Right-stick scroll
- A/X button: click / double-click / hold-to-drag
- B/Circle: right-click
- Back/Select: exit
Requirements
- macOS (Quartz native API used)
- Python 3.8+
- Accessibility permission enabled for the running Python interpreter (see below)
- A supported controller recognized by
pygame(your SteelSeries controller)
Quick install (recommended in a virtualenv)
-
Create and activate a virtualenv:
python3 -m venv venv source venv/bin/activate -
Install dependencies:
pip install -r requirements.txt -
Run directly:
python -m controller_mouse.main
Or install as a console script:
pip install .
controller-mouse
macOS Accessibility / Permissions
- To move and control the mouse programmatically, macOS requires the process to be granted Accessibility (Input Monitoring / Accessibility) permissions.
- On first run you will likely be prompted. If not, open:
System Settings � Privacy & Security � Accessibility (and/or Input Monitoring) and add your terminal or Python interpreter (e.g.
/usr/bin/python3or your virtualenvpython). - You may need to restart the terminal or the process after granting permission.
Files
controller_mouse/main.py— the converted script as an importable module and CLI entrypointcontroller_mouse.py— thin launcher with the original filename (calls package main)pyproject.toml— project metadata and console scriptrequirements.txt— runtime dependenciesLICENSE— MIT license.gitignore— ignores caches and venvs
Configuration
- Edit constants at the top of
controller_mouse/main.py:MOUSE_SPEED— base pixels per frameDEADZONE— stick deadzoneSCROLL_SPEED— scroll multiplierACCELERATION— curve exponent
Usage notes
- Run with a controller connected and
pygamedetecting it. - If you experience jitter, try reducing
MOUSE_SPEEDor increasingDEADZONE. - Run at your own risk; the script posts native mouse events.
License
- MIT — see LICENSE file