Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-71714

QGamepadKeyNavigation have a bug on handling of ButtonL2/ButtonR2

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 5.11.0
    • GamePad
    • None
    • All

      QGamepadKeyNavigationPrivate::_q_processGamepadButtonPressEvent() have next code:

          //Trigger buttons are a special case as they get multiple press events as the value changes
          if (button == QGamepadManager::ButtonL2 && buttonL2Pressed)
              return;
          else
              buttonL2Pressed = true;
          if (button == QGamepadManager::ButtonR2 && buttonR2Pressed)
              return;
          else
              buttonR2Pressed = true;

      So, when button != ButtonL2  or ButtonR2 it code will set buttonR2Pressed and/or buttonL2Pressed to true.

      It should be changed to code like this:

          if (button == QGamepadManager::ButtonL2) {
              if (buttonL2Pressed)
                  return;
              else
                  buttonL2Pressed = true;
          }
          if (button == QGamepadManager::ButtonR2) {
              if (buttonR2Pressed)
                  return;
              else
                  buttonR2Pressed = true;
          }

       

      Also, QGamepadKeyNavigation have no any mechanizm to unset some key binding at all. What makes it impossible to use it in some cases.

       

       

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            janichol Andy Nichols
            alexander74 Unrau Alexander
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes