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

DPad key codes are different between the OBS plugin and io-cct #175

Closed
Dagnus opened this issue May 25, 2021 · 8 comments
Closed

DPad key codes are different between the OBS plugin and io-cct #175

Dagnus opened this issue May 25, 2021 · 8 comments

Comments

@Dagnus
Copy link

Dagnus commented May 25, 2021

Describe the bug
D-Pad buttons created as gamepad buttons are created and work correctly in the confines of the web tool (tested on both Edge and Chrome), but once loaded through the OBS plugin, will no longer be recognized.

The inputs are correctly recognized if using the gamepad preset file set inside OBS

Looking at both json files, the DPad key codes captured by the webtool do not match the ones from the preset file:

  • DPad Up: Preset = 60429, Webtool = 60435
  • DPad Down: Preset = 60430, Webtool = 60436
  • DPad Left: Preset = 60427, Webtool = 60433
  • DPad Right: Preset = 60428, Webtool = 60434

Replacing the webtool generated IDs by the ones from the preset in the JSON will work around the issue in OBS.
Loading the gamepad preset in the webtool will not recognized dpad inputs correctly.

Using the arcade-stick preset works correctly both in io-cct and in OBS.

To Reproduce
OS: Windows 10 Pro 20H2 19042.985
Gamepad: Microsoft Xbox Series X Controller or Hitbox Cross|Up

Creating a gamepad button for any of the dpad direction.

Expected behavior
Key codes should work both inside the webtool and the OBS plugin.

Screenshots!
Buttons recognized in Edge but not in OBS

Additional information:

  • input-overlay.v5.0.0rc1-8d04a98
  • OBS Studio: 27.0.0-rc6

Additional context
I am trying to create an arcade stick layout for the Hitbox Cross|Up which has both a lever (standing in as a left analog stick) and separate buttons for the d-pad (see Cross|Up Image, they are the white buttons ).
I have also tried this with an Xbox Controller and I am seeing the same behavior.

@JustAKat
Copy link

JustAKat commented Aug 30, 2021

Tried this with a PS4 controller (with DirectInput) with similar issues as well. FaithG_ has also mentioned having issues getting the DS4 inputs that were registered by io-cct to be recognised by OBS.

Will there be a similar utility to the previous demo_hook, but for XInput and DirectInput keycodes and such?

@univrsal
Copy link
Owner

There's the some test tools here, but the binding dialog in obs studio should be all you need.

@JustAKat
Copy link

JustAKat commented Aug 30, 2021

There's the some test tools here, but the binding dialog in obs studio should be all you need.

I did try the binding dialog in OBS Studio, but it seems to be haphazardly picking up some rather random inputs that don't seem to correspond to the pressed buttons. Cheers for the tools!

We have just about figured out which keycodes corresponds to which PS4 buttons prior to this, with just the right analog stick, L2 and R2 (and L3 and R3) still needing to be figured out. However, hopefully with the tools, the DirectInput PS4 preset JSON should be able to be properly finished by faithG_.

@univrsal
Copy link
Owner

I did try the binding dialog in OBS Studio, but it seems to be haphazardly picking up some rather random inputs

Do you have multiple gamepads connected? It might also be your analog sticks sending some ghost inputs, but other than that it should only be looking for the last button pressed or axis moved

@JustAKat
Copy link

JustAKat commented Aug 31, 2021

I did try the binding dialog in OBS Studio, but it seems to be haphazardly picking up some rather random inputs

Do you have multiple gamepads connected? It might also be your analog sticks sending some ghost inputs, but other than that it should only be looking for the last button pressed or axis moved

Nope, just one (via usb), and yea, I'm pretty sure my analog sticks are doing that. Doesn't seem to be any workaround to temporarily get it to ignore the jitter, though.

@univrsal
Copy link
Owner

I did try the binding dialog in OBS Studio, but it seems to be haphazardly picking up some rather random inputs

Do you have multiple gamepads connected? It might also be your analog sticks sending some ghost inputs, but other than that it should only be looking for the last button pressed or axis moved

Nope, just one (via usb), and yea, I'm pretty sure my analog sticks are doing that. Doesn't seem to be any workaround to temporarily get it to ignore the jitter, though.

I could add a deadzone which would help

@JustAKat
Copy link

JustAKat commented Sep 1, 2021

I did try the binding dialog in OBS Studio, but it seems to be haphazardly picking up some rather random inputs

Do you have multiple gamepads connected? It might also be your analog sticks sending some ghost inputs, but other than that it should only be looking for the last button pressed or axis moved

Nope, just one (via usb), and yea, I'm pretty sure my analog sticks are doing that. Doesn't seem to be any workaround to temporarily get it to ignore the jitter, though.

I could add a deadzone which would help

That might, yes

But to properly add on to OP's, it has been noted that the following are the keycodes that corresponds to the PS4 controller using DirectInput:

Cross ("a" is "60417"
Circle ("b") is "60418"
Triangle ("y") is "60419"
Square ("x") is "60416"

Options ("start") is "60426"
Share ("select") is "60425"

However, with the default gamepad preset, with those codes swapped in, those buttons will be detected as intended, but when loaded into and tested on the site, some of them are detected as multiple buttons instead.

Said modified JSON file is as below (zipped as Github does not support JSON)
ds4-pad.zip

@univrsal
Copy link
Owner

univrsal commented Dec 5, 2022

See #297 for further tracking

@univrsal univrsal closed this as completed Dec 5, 2022
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

No branches or pull requests

3 participants