Coder Social home page Coder Social logo

screllicopter / jstest-gtk Goto Github PK

View Code? Open in Web Editor NEW

This project forked from grumbel/jstest-gtk

0.0 2.0 0.0 254 KB

Pretty much just a quick mod to fix dark themes

Home Page: https://jstest-gtk.gitlab.io

License: GNU General Public License v3.0

C++ 93.91% CMake 3.58% Roff 2.40% Shell 0.11%

jstest-gtk's Introduction

Build Status

jstest-gtk

jstest-gtk is a simple joystick tester based on Gtk+. It provides you with a list of attached joysticks, a way to display which buttons and axis are pressed, a way to remap axis and buttons and a way to calibrate your joystick.

You can find the latest version at:

Questions, comments and bug reports can be given to:

Compiling

Make sure you have the following pieces of software installed (they are part of most distributions):

  • cmake
  • sigc++
  • gtkmm

You can compile it by typing:

$ mkdir build
$ cd build
$ cmake ..
$ make

Usage

Once compiled you can start jstest-gtk with:

$ ./jstest-gtk

or if you know the device you want to test with:

$ ./jstest-gtk /dev/input/js0

The main window will provide you with a list of currently available joysticks. When you double click a joystick it will display the Test dialog, allowing you to test buttons and axes on the joystick.

The mapping dialog allows you to reorder the buttons and axis. This is useful for example when a game expects the dpad to be on axis 0 and 1, while in reality it is often on axis 4 and 5 on a dual-analogstick gamepad.

The calibration dialog allows you to manipulate some low level details on how the raw axis values are mapped to the joystick device. For example you can inverse an axis, disable an axis or remove its deadzone, to gain more fine control on small movements. This is especially useful as the default calibration values for most joysticks give it a far bigger deadzone then needed, thus reducing your ability for fine movements.

SDL Notes

Depending on what version and what compilation flags where used, your version of SDL might not use the joystick interface at all, but instead use the /dev/input/event* device directly. That means that any calibration or button/axis mapping will be ignored, as those apply to the joystick interface, not evdev.

To work around that you have to set an environment variable that forces SDL to use the joystick device:

$ SDL_JOYSTICK_DEVICE="/dev/input/js0"
$ export SDL_JOYSTICK_DEVICE

When you need two or more joysticks this will not work and you might need to recompile SDL and disable the evdev support.

More info can be found at:

  • ftp://ptah.lnf.kth.se/pub/misc/sdl-env-vars

SDL_LINUX_JOYSTICK: Special joystick configuration string for linux. The format is name numaxes numhats numballs where name is the name string of the joystick (possibly in single quotes), and the rest are the number of axes, hats and balls respectively.

SDL_JOYSTICK_DEVICE: Joystick device to use in the linux joystick driver, in addition to the usual: /dev/js*, /dev/input/event*, /dev/input/js*

jstest-gtk's People

Contributors

abogical avatar grumbel avatar jvies avatar screllicopter avatar skitt avatar zekesulastin avatar

Watchers

 avatar  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.