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

Shortcut overriding in line edits on OS X is broken

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P3: Somewhat important
    • None
    • 5.4.2
    • None
    • OS X10.10.3 using a standard US Apple keyboard on a mac mini.
    • macOS

    Description

      On OS X QLineEdit does not override the Cmd+Left, Cmd+Right shortcuts. This is because OS X sends the KeypadModifier as well as the ControlModifier when pressing those keys. The code in QWidgetLineControl::processShortcutOverrideEvent only accepts the override event if modiifers() == Qt.ControlModifier, thereby failing on OS X (the code checks for equality with the well known shortcuts which are defined as Control+Left and Control+Right).

      The bug probably affects other shortcuts as well, but those were the ones I tested.

      The fix is either to filter out the keypad modifier before testing for equality in that function or add the keypad modifier to the platform shortcut definitions in QKeySequence.

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            kovid Kovid Goyal
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes