Git Product home page Git Product logo

pjla's Introduction

python-joystick-linux-api

A pure-python linux joystick api module using select to make blocking/non-blocking reading

pjla's People

Contributors

cptx032 avatar johny22 avatar

Watchers

 avatar  avatar

Forkers

johny22

pjla's Issues

implement IOCTLs

Create static_method functions in Joystick class implementing the IOCTLs operations (in 4 session of docs/joystick-api.txt)

  • use pep8
  • must be compatible with python2 and python3
  • if possible make test cases

Implement the holding of a button

Today we can bind a function to a press/release event, but would be nice bind a function to hold of a button, pressing it many seconds, like holding the right arrow key to make a character run/walk to right

Add more joystick/joypad keymap buttons models

Today we have some variables in joystick.py starting with KM_ML. KM = keymap, ML = multilaser. This is the only joystick that I have now, so would be nice have have more variables from many other devices

Adjust the ANY bind

We have today an bind called Joystick.ANY that is runned in any event. The problem is that in initial connection is sent many fake events (or virtual events like docs saids). These events have the states of buttons. The any bind will capture these events...but would be nice not capture if you wish. So, a suggestion is split the any event in two events: Joystick.ANY that capture any events (including fake events) and Joystick.ANY_REAL for only "real" events. Other choice is create ANY to only real events and ANY_WITH_FAKES for include fakes. Choose whats your think is best.

include examples

Create a folder called examples and add many examples you can. Suggestions:

  • example with blocking using terminal/console
  • example unblocking using Tkinter (consider using python 2 and 3)
  • example using pyglet/opengl controling the view of a 3d scene

Implements the arrow key binds

Today we have only button press/release, but have not any bind to the arrow keys (the arrow keys are treated different in joystick api, is like it was not buttons...because the joystick is emulated in buttons...)

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.