A Python library for reading raw HID input from the Steam Deck, bypassing Steam Input.
Project description
Disclaimer: This is an work in progress project that happened during the development of another project. Dont take it as done, stable or secure. It only works on the Steam Deck. It was created with the help of generative AI.
Bitsteam
A low-level Python library for reading raw HID input from the Steam Deck, bypassing the default Steam Input system.
Overview
Bitsteam allows you to capture every button press, joystick movement, trigger pull, and IMU (gyroscope) event directly from the hardware. This is ideal for projects that require custom controller logic, robotics, or interfacing with applications outside of Steam without input conflicts.
Core Features
- Raw HID Access: Reads the device's raw 64-byte data stream.
- Full Input Support: Captures all buttons, analog sticks, triggers, trackpads, and grip buttons.
- Real-time IMU: Provides processed, frame-by-frame delta angles for pitch, yaw, and roll from the gyroscope.
- Conflict-Free: Designed to work alongside a
udevrule to prevent the OS or Steam from intercepting inputs.
Installation
The package is available on PyPI and can be installed with pip:
pip install bitsteam
Quick Start
Here is a simple example to get you started.
import time
from bitsteam.deck import SteamDeck
# Initialize and start the background listener
deck = SteamDeck()
deck.start()
try:
while True:
a_button = deck.get_button_state('a')
analogs = deck.get_analog_values()
right_trigger = analogs['right_trigger']
print(f"\rA Button: {a_button}, Right Trigger: {right_trigger}", end="")
time.sleep(0.1)
except KeyboardInterrupt:
print("\nStopping...")
finally:
deck.stop()
Contributing
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bitsteam-0.1.0.tar.gz.
File metadata
- Download URL: bitsteam-0.1.0.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96e75f5b08d0e0f180563b659c3da64b54a01d21185529200ae0bfc1fb373d7d
|
|
| MD5 |
6ce1d2b53d498ab4ac9d059f7d5907d5
|
|
| BLAKE2b-256 |
696bafcbb159219d785869ede4d6dc312e577b55ef601306075d5038e656e59a
|
File details
Details for the file bitsteam-0.1.0-py3-none-any.whl.
File metadata
- Download URL: bitsteam-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35ea5f4ea6fd0ec5defd8d8b8f6bb73fae5bcba29c009a37a93a046ba8d65454
|
|
| MD5 |
c528f4ae93a97e9d98cef05fd2c87486
|
|
| BLAKE2b-256 |
be34e708be1becb54436df4c85c439c5bd03befa4b5f75ebca7c6c2668f18bbc
|