WootingKb / wootility-issues

A place to report issues with the Wootility and help with feedback on existing issues
25 stars 3 forks source link

Gamepad output becomes frozen when switching profiles via Wootlity #8

Closed DarrenVs closed 4 years ago

DarrenVs commented 4 years ago

Wootility Version

3.3.3

Firmware Version

1.27.3

Keyboard type

Wooting One

Issue description

Holding down gamepad keys or thumbstick's while switching to the 'Digital Profile' gets them in a stuck state until you switch back to one of the 'Analog Profile'

Note: This only occurs via Wootility. Not via the Mode key on the Wooting keyboard.

Steps to reproduce

  1. Open Wootility
  2. Create an analog profile and and bind the gamepad to the keyboard similar to the picture below cZIX9A90pH
  3. Save the profile
  4. Open a gamepad tester/debugger
  5. Hold down one or more keys that you have bound to the gamepad
  6. Use your mouse to click and switch back to the 'Digital Profile'
  7. Release the keys
  8. Notice that the analog and/or gamepad output is stuck

Pictures / Video of problem

(Click for video controls) Click for link to imgur

Result:

xmqUL0rg4t

Rocky04 commented 4 years ago

Another very old Bug not related to just analog and the Wootility, the problem is the same for all inputs. So the problem occur too for the digital keys by toggeling the profile via the keyboard itself.

A possible fix should be quiet easy, on every profile switch all the keys on the used analog interface and the keyboard interfaces should send zeros, only the special modifier states (like caps lock, num lock & scroll lock) should still hold their previous state. Depending how the implementation is working it's maybe possible to call the handling just with zero values.

PastaJ36 commented 4 years ago

Alright, verified this issue. In most cases it was resetting correctly, but there's one more case where the key sticks. If you press a normal key in analog mode and then switch to another analog profile with digital keys off it will stick.

I've changed switching logic now to (pseudocode):

if ( targetProfileIsDigital) {
    resetAnalogInterface()
} else if (targetProfileIsAnalog && digitalOff) {
    resetNormalKeys()
}

This way digital keys keep state while switching between profiles, but will send zeroes if the profile's digital keys is off. Thoughts?

Rocky04 commented 4 years ago

There are still problems, like if you switch from XInput to DirectInput because these are different interfaces.

if (get_target_profile_digital_state() == disabled)
{
    reset_normal_keys();
}

if (get_target_profile_analog_mode() != current_analog_mode)
{
    reset_current_analog_interface();
}
PastaJ36 commented 4 years ago

Yes true, I'll see if I can add it.

PastaJ36 commented 4 years ago

Alright, done now. Will be added to full programmability beta. Thanks

Rocky04 commented 4 years ago

Fixed in Wootility 3.5.2 and firmware 1.28.3.

PastaJ36 commented 4 years ago

Keeping this open until the fix is in public