Skip to main content

Crate deckhidraw

Crate deckhidraw 

Source
Expand description

§Rust Steam Deck gamepad raw input

crates.io documentation 0BSD licensed

This project is unofficial! This project is not affiliated with Valve Corporation.

This uses hidraw to access inputs, which bypasses any input remapping that might be performed by Steam. This allows access to all inputs, all in a single packet, without having to integrate with any Steam APIs or to even have Steam open at all. This is also not subject to limitations of Xbox-style gamepads, meaning that all analog axes can be accessed independently.

This code can be compiled for any platform, but finding the device node will always fail on not-Linux.

Modules§

buttons
Constants for button presses
commands
Commands that can be sent as HID feature reports

Structs§

InputReport
Struct representing the data from the controller

Constants§

INPUT_REPORT_MAGIC
Magic number at the beginning of every packet

Functions§

find_deck_hidraw
Find the hidraw device for the Deck’s controls