GithubHelp home page GithubHelp logo

vytskalt / stick Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ardaku/stick

0.0 0.0 0.0 1.02 MB

Platform-agnostic asynchronous gamepad, joystick and flightstick library for the Rust Programming Language

Home Page: https://crates.io/crates/stick

License: Apache License 2.0

Rust 100.00%

stick's Introduction

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

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 [email protected].

stick's People

Contributors

aldaronlau avatar chronophylos avatar dependabot-preview[bot] avatar dependabot[bot] avatar dparnell avatar iraiko avatar jamesmcm avatar jannic avatar theunkn0wn1 avatar vytskalt avatar zeddidragon avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.