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

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P1: Critical P1: Critical
    • 6.7.0 FF
    • 5.12.5, 6.2.1, 6.5.0, 6.6
    • None

      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")
                  }
              }
          }
      }
      

       

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes