Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] _Basic_ VDF support #54

Open
wants to merge 104 commits into
base: master
Choose a base branch
from
Open

[WIP] _Basic_ VDF support #54

wants to merge 104 commits into from

Conversation

mcronce
Copy link
Contributor

@mcronce mcronce commented Feb 13, 2017

This PR adds a new script, sc-configurable.py, which accepts a .vdf as an argument. It also fixes a couple issues I found along the way.

I will note that there are quite a few things that this PR does not add support for. Anything other than the Full_Press action is unsupported. A handful of input group modes are not yet working - most notably, axes for triggers does not work.

Notable things that are working:

  • Each input group's "button" mode (including dpad and button_diamond modes for pads and stick)
  • Modeshifting when grips are held
  • Axis modes for both pads and the stick
  • Mouse and mouse scroll modes for pads
  • Mouse mode for stick

Issues fixed:

  • Pads flipping out when used in axis mode - I really don't know why this was happening, but it was resolved when I fixed...
  • When stick and LPAD were both in axis mode, stick input would also register as LPAD input
  • Speaking of stick and LPAD, they can now provide separate "click" inputs

And a few other little additions that other coders might appreciate:

  • The gamepad definition sent to the uinput subsystem is now definable - if you pass a "gamepad_definition" dict to EventMapper::init(), it will pass it down the stack
  • You can specify which uinput "mode" you're adding a button action to with an optional "mode" argument to the various EventMapper functions
  • Daemon::init() now accepts a "logfile" argument, which defaults to os.devnull if not specified

Last but not least, I did alter styling in a couple places while I was working. I apologize for that, it got caught up being committed with some other work. There are only a few lines on which it happened, so if it bothers you, I'll change it back.

…() function, and vdf2sensible_json() function
…ate_keys() function, and vdf2sensible_json() function"

This reverts commit f681c73.
…th join_duplicate_keys() and load_vdf() functions
…urce_bindings keys with values in load_vdf()
…m item, rather than just the binding dict entry
…ng() will return null on failure, took out try/except blocks
…mply removes underscores from key_press bindings; this fixes shift keys, may fix other things
…eamcontroller.config.json2vdf() and steamcontroller.config.vdf2json(), respectively
…ble.py is now in src/config.py, primarily but not entirely in a class called Configurator
…ict and a single if statement for key name replacement
@mcronce
Copy link
Contributor Author

mcronce commented Feb 13, 2017

Oh yeah - one other little thing I'm not super happy with.

Right now, it takes whatever keycode you have configured and adds 0x100 to it. This is to get the libinput subsystem to recognize the input as gamepad input instead of keyboard input. I'm intending to make this optional at some point in the future.

@mcronce mcronce changed the title _Basic_ VDF support [WIP] _Basic_ VDF support Feb 16, 2017
@mcronce
Copy link
Contributor Author

mcronce commented Feb 16, 2017

Had to WIP this. Finally got to a point of actually play testing this and it turns out that if I'm holding a grip to modeshift, press a button that's modeshifted, release the grip, then release the modeshifted button, it never sends a "released" code for the modeshifted button.

I consider this a critical enough problem that this shouldn't be merged until it's resolved. I'll try to have something in for it by the end of the weekend.

@ynsta
Copy link
Owner

ynsta commented Jun 13, 2017

Hello,

I was occupied by many other things.

What is the the current status have you solved your bug ?

Thank you for your work anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants