MCPcopy Index your code
hub / github.com/ardaku/stick

github.com/ardaku/stick @v0.13.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.13.0 ↗ · + Follow
138 symbols 184 edges 21 files 51 documented · 37%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Stick

Folders in this repository: - stick/: The Stick crate. - sdb/: The Stick Public Domain database of controllers (not limited to game controllers). - gcdb/: Git Submodule to grab optional SDL mappings from. - xtask/: Scripts run with cargo-xtask.

Xtask

Stick uses the xtask repository model to have various scripts written in Rust process controller data, also allowing serde to not be a direct dependency.

Available Commands

  • cargo xtask, cargo xtask --help - Print help
  • cargo xtask sdb - Generate the embeddable bytecode databases.

TOML Format

File names are 64-bit hexadecimal values with leading zeros followed by .toml within a folder referring to the platform.

name = "My Controller Name"
type = "xbox"

[remap]
TriggerR = {} # Ignore events
TriggerL = {}
HatUp = "Up" # Map hat to dpad when you're not using a flightstick
HatDown = "Down"
HatLeft = "Left"
HatRight = "Right"
CamX = { event = "CamX", deadzone = 0.075 } # Adjust deadzones
CamY = { event = "CamY", deadzone = 0.075 }
JoyZ = { event = "TriggerR", max = 1024 } # Set higher-precision axis ranges (usually 255)
CamZ = { event = "TriggerL", max = 1024 }

type

Type can be any of the following: - xbox - An Xbox Gamepad (W3 Standard Gamepad Compliant) - flight - A Flightstick - playstation - A PlayStation Gamepad (W3 Standard Gamepad Compliant) - nintendo - A Nintendo Gamepad (W3 Standard Gamepad Compliant) - gamepad - A generic Gamepad (W3 Standard Gamepad Compliant)

License

Licensed under any of - Apache License, Version 2.0, (LICENSE_APACHE_2_0.txt or https://www.apache.org/licenses/LICENSE-2.0) - MIT License, (LICENSE_MIT.txt or https://mit-license.org/) - Boost Software License, Version 1.0, (LICENSE_BOOST_1_0.txt or https://www.boost.org/LICENSE_1_0.txt)

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be licensed as described above, without any additional terms or conditions.

Help

If you want help using or contributing to this library, feel free to send me an email at aldaronlau@gmail.com.

Extension points exported contracts — how you extend this code

Listener (Interface)
Controller Listener Implementation [1 implementers]
stick/src/raw.rs
Global (Interface)
Thread local global state implementation. [1 implementers]
stick/src/raw.rs
Rumble (Interface)
(no doc) [2 implementers]
stick/src/ctlr.rs
Controller (Interface)
Controller Implementation
stick/src/raw.rs

Core symbols most depended-on inside this repo

button
called by 72
stick/src/ctlr.rs
name_to_hex
called by 40
xtask/src/sdb.rs
axis
called by 12
stick/src/ctlr.rs
pressure
called by 11
stick/src/ctlr.rs
rumble
called by 4
stick/src/ctlr.rs
to_id
called by 2
stick/src/event.rs
load
called by 2
stick/src/ctlr.rs
joystick_haptic
called by 2
stick/src/raw/linux.rs

Shape

Method 64
Class 33
Function 30
Enum 7
Interface 4

Languages

Rust100%

Modules by API surface

stick/src/raw/linux.rs36 symbols
stick/src/raw/windows.rs31 symbols
stick/src/ctlr.rs22 symbols
stick/src/raw.rs15 symbols
stick/src/listener.rs5 symbols
stick/src/event.rs5 symbols
stick/examples/haptic.rs5 symbols
xtask/src/main.rs4 symbols
xtask/src/sdb.rs3 symbols
stick/src/focus.rs2 symbols
stick/src/raw/wasi.rs1 symbols
stick/src/raw/redox.rs1 symbols

For agents

$ claude mcp add stick \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact