Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How to get keyboard scan code?
Qt 6.11 is out! See what's new in the release blog

How to get keyboard scan code?

Scheduled Pinned Locked Moved Mobile and Embedded
5 Posts 2 Posters 6.1k 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Is there any way to get the scan code from the key event?

    Colman

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      "http://doc.qt.nokia.com/4.7/qwidget.html#keyPressEvent":http://doc.qt.nokia.com/4.7/qwidget.html#keyPressEvent

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        I install a event filter to catch the button scan code, but Qt never send a code that it cannot map to the standard PC key code. For eaxmple, it does not generate a event with scan code 0x240, 0x11F, etc. May be it does not generate event with scan code larger than 0x100. How can I get the events for those scan code?

        Colman

        1 Reply Last reply
        0
        • ? Offline
          ? Offline
          A Former User
          wrote on last edited by
          #4

          Just forgot to tell you, it is run on qt-embedded for Linux, the nativeScanCode always return 0.

          Colman

          1 Reply Last reply
          0
          • ? Offline
            ? Offline
            A Former User
            wrote on last edited by
            #5

            Colman. I can't remember where but I read about what a thing was a similar issue (some key events that were always processed by "qt" and would never make to the event loops). The solutions was to deal with other event functions on QApplication, like:

            http://doc.qt.nokia.com/latest/qapplication.html#qwsEventFilter
            http://doc.qt.nokia.com/latest/qapplication.html#x11EventFilter

            Have you tried those?

            There was some other approach too but I can't remember what it was.

            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