Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/discretetom/kontroller
A demo project to read all SteamDeck input (including trackpad and gyro) via SteamInput without using a game engine.
https://github.com/discretetom/kontroller
Last synced: 4 months ago
JSON representation
A demo project to read all SteamDeck input (including trackpad and gyro) via SteamInput without using a game engine.
- Host: GitHub
- URL: https://github.com/discretetom/kontroller
- Owner: DiscreteTom
- License: mit
- Created: 2023-09-30T11:54:14.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-01T12:12:31.000Z (11 months ago)
- Last Synced: 2024-10-04T19:56:02.698Z (5 months ago)
- Language: Rust
- Homepage:
- Size: 21.8 MB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# kontroller
[](https://github.com/DiscreteTom/kontroller/releases/latest)

A demo project to read all SteamDeck input (including trackpad and gyro) via SteamInput without using a game engine.

## Run
1. Switch to Desktop Mode on SteamDeck.
2. Download `kontroller` from [release page](https://github.com/DiscreteTom/kontroller/releases/latest), or [build](#build) it yourself. Put it in SteamDeck.
3. Put `redistributable_bin/libsteam_api.so` in the PATH (e.g. `/usr/lib`).
4. Copy `kontroller.vdf` into `/home/deck/.local/share/Steam/controller_config` (create the folder if it doesn't exist), rename it to `game_actions_480.vdf`.
5. Run `kontroller` on SteamDeck. This should open a new window, but your input can't be captured now. Close the window.
6. Start steam client on the Desktop Mode. In your library, you should find a game called `Spacewar`. [Edit its input mapping](https://partner.steamgames.com/doc/features/steam_controller/getting_started_for_devs#14).
7. Run `kontroller` again, you should get the input you want.## Build
> [!NOTE]
> You'd better build the project on SteamDeck.```bash
cargo build --release
```## FAQ
- Why not to use a game engine?
- This app doesn't need high quality UI update, but need to read input as fast as possible.
- Besides, I want the built binary to be as small as possible.
- What GUI library do you use?
- [iced](https://github.com/iced-rs/iced).
- Steam Input requires a window to be focused to read input, so a GUI library is required.
- WebView-based GUI lib seems not working. Tested with [Tauri](https://tauri.app/) and [web-view](https://github.com/Boscop/web-view)
- The GUI process should be the same as the main process.
- Why the name is `Spacewar` and the app id is 480?
- 480 is a commonly used app id for testing for steamworks developers. The name `Spacewar` is the name for the app with app id 480.
- I tried to start the executable file on SteamDeck but no window shows up.
- Make sure you have `libsteam_api.so` in the PATH.
- Start the executable in a terminal and show me the output by opening an issue.
- What if I just want to use joysticks and buttons?
- That is much easier. See my another project [stickdeck](https://github.com/DiscreteTom/stickdeck).