https://github.com/isxander/steamdeck4j
A java interface for getting Steam Deck inputs using CEF debugger.
https://github.com/isxander/steamdeck4j
Last synced: 4 months ago
JSON representation
A java interface for getting Steam Deck inputs using CEF debugger.
- Host: GitHub
- URL: https://github.com/isxander/steamdeck4j
- Owner: isXander
- Created: 2024-07-20T18:54:51.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2025-01-01T18:36:37.000Z (over 1 year ago)
- Last Synced: 2025-03-31T00:07:00.980Z (about 1 year ago)
- Language: Java
- Size: 98.6 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# steamdeck4j
A Java library for getting the Steam Deck's raw input data by using the SteamClient API
via the CEF debugger.
## Usage
```java
SteamDeck deck = SteamDeck.create(); // you can also pass in a custom CEF url here
// poll the Steam Deck for input data and join the future
// this is a manual process and will not be polled automatically
deck.poll().join();
ControllerState state = deck.getControllerState();
float gyroX = state.flGyroDegreesPerSecondX();
boolean r5Button = state.getButtonState(ControllerButton.R5); // back grip button
deck.close(); // unregisters listeners and closes the connection
```
## Things to note
This library requires the CEF debugger to be exposed, which it is not by default.
[Decky Loader](https://decky.xyz) is a common app used on Steam Deck to add plugins, and this
enables the CEF debugger to function. It is recommended that users install Decky as it's the easiest way
to get the CEF debugger working.