Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QKeyEvent::nativeScanCode in QML

QKeyEvent::nativeScanCode in QML

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 3.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bundickt
    wrote on last edited by
    #1

    Is there a way to get the native scan code of a key event in QML?

    I am using a proprietary keyboard that has things like fast forward, rewind, and some other keys on it. My qml app receives the pressed and released events but the event.key property contains -1. I wrote a test app using Qt and saw that the native scan code contains the value we need. I need all QML items to be able to us the Keys.onPressed: { ... } and see the native scan code.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mbrasser
      wrote on last edited by
      #2

      Hi,

      Unfortunately, the native scan code isn't currently exposed (src/declarative/qdeclarativeevents_p_p.h is where the QML key event is defined). I'd recommend adding a suggestion for this in the "bug tracker":http://bugreports.qt.nokia.com. I can't think of any workarounds; hopefully others will have some ideas there.

      Regards,
      Michael

      1 Reply Last reply
      0
      • B Offline
        B Offline
        bundickt
        wrote on last edited by
        #3

        Created an issue: http://bugreports.qt.nokia.com/browse/QTCOMPONENTS-563

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved