steamcontroller icon indicating copy to clipboard operation
steamcontroller copied to clipboard

[WIP] _Basic_ VDF support

Open mcronce opened this issue 8 years ago • 3 comments

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.

mcronce avatar Feb 13 '17 03:02 mcronce

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 avatar Feb 13 '17 16:02 mcronce

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.

mcronce avatar Feb 16 '17 21:02 mcronce

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.

ynsta avatar Jun 13 '17 19:06 ynsta