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

Mac: QML Shortcut with StandardKey.Copy sequence is not activated in russian (any non-latin?) locale

    XMLWordPrintable

Details

    Description

      on MacOS:

      QML shortcut using StandardKeys.Copy as sequence is not activated when keyboard uses Russian (or other non-latin) layout. I guess, it also doesn't work with another StandardKey values.

      Keys.onPressed or Keys.onShortcutOverride is triggered, however.

      Test sample:

      import QtQuick 2.12
      import QtQuick.Window 2.12
      
      Window {
          visible: true
          width: 640
          height: 480
          title: qsTr("Press CMD+C (Copy shortcut)")
      
          Item {
              anchors.fill: parent
              focus: true
      
              Shortcut {
                  sequence: StandardKey.Copy
                  onActivated: console.log("StandardKey.Copy shortcut activated")
                  onActivatedAmbiguously: console.log("StandardKey.Copy shortcut activated ambiguously")
              }
      
              Keys.onShortcutOverride: {
                  if (event.matches(StandardKey.Copy)) {
                      console.log("StandardKey.Copy Keys.onShortcutOverride")
                  }
              }
          }
      }
      

       

      Attachments

        Issue Links

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

          Activity

            People

              vestbo Tor Arne Vestbø
              sergei.nevdakh Sergei Nevdakh
              Votes:
              6 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes