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

Don't use SH_MenuBar_AltKeyNavigation by default

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • None
    • Widgets: Style Sheets
    • None
    • Up-to-date Arch Linux with KDE 4.

    Description

      Recent changes to Qt4 and Qt5 have rendered both unusable to me with most widget styles, with the behaviour of SH_MenuBar_AltKeyNavigation causing me grief. Most styles have this returning true, which causes the menu at the top of the window to be focused when Alt is pressed. (In addition, there is no indication that the menubar now has keyboard focus for most styles.) This means that further keystrokes are sent to the menu, e.g. if I then tap "f", the file menu opens.

      This would be slightly irritating in itself, but I suffered from RSI, and use an ergonomic keyboard. This works well, but has a very poorly placed alt key. Hence, I must use at-home-modifier. If I hold down the enter key and press another key simultaneously, it acts as an alt modifier. If I tap the enter key briefly, it sends an enter keystroke. However, it first sends a brief alt, before releasing it to send the enter keystroke. This worked fine in the past with almost all applications.

      However, with the new kate, every time I try to print a newline, my enter key quickly sends an alt first, sending focus to the menu. The enter keystroke then opens the first menu, and the main pane loses focus. As a fix, I can modify qt-everywhere-opensource-src-5.4.1/qtbase/src/widgets/styles/qfusionstyle.cpp and make SH_MenuBar_AltKeyNavigation return false. This fixes the problem for me. Similar changes in Qt4 (e.g. to qt-everywhere-opensource-src-4.8.6/src/gui/styles/qcleanlooksstyle.cpp) fix this for me in Dolphin.

      I'm not sure if this is an intentional change, but I'd love for this behaviour to be changed for future versions. Originally discussed here: https://forum.kde.org/viewtopic.php?f=17&t=124683

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            sparhawk Sparhawk
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes