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

QGamepadKeyNavigation have a bug on handling of ButtonL2/ButtonR2

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Won't Do
    • Affects Version/s: 5.11.0
    • Fix Version/s: None
    • Component/s: GamePad
    • Labels:
      None
    • Platform/s:
      All

      Description

      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.

       

       

        Attachments

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

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes