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?
Forum Updated to NodeBB v4.3 + New Features

How to get keyboard scan code?

Scheduled Pinned Locked Moved Mobile and Embedded
5 Posts 2 Posters 5.5k 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.
  • C Offline
    C Offline
    Colman
    wrote on 7 Jan 2011, 03:03 last edited by
    #1

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

    Colman

    1 Reply Last reply
    0
    • F Offline
      F Offline
      fcrochik
      wrote on 7 Jan 2011, 03:12 last edited by
      #2

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

      Certified Specialist & Qt Ambassador <a href="http://www.crochik.com">Maemo, Meego, Symbian, Playbook, RaspberryPi, Desktop... Qt everywhere!</a>

      1 Reply Last reply
      0
      • C Offline
        C Offline
        Colman
        wrote on 7 Jan 2011, 04:13 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
        • C Offline
          C Offline
          Colman
          wrote on 7 Jan 2011, 04:33 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
          • F Offline
            F Offline
            fcrochik
            wrote on 7 Jan 2011, 13:27 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.

            Certified Specialist & Qt Ambassador <a href="http://www.crochik.com">Maemo, Meego, Symbian, Playbook, RaspberryPi, Desktop... Qt everywhere!</a>

            1 Reply Last reply
            0

            1/5

            7 Jan 2011, 03:03

            • Login

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