Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. From QKeySequence to vk_code ?
Forum Updated to NodeBB v4.3 + New Features

From QKeySequence to vk_code ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 3 Posters 806 Views 2 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.
  • R Offline
    R Offline
    reonZ
    wrote on last edited by
    #1

    Is there a way to translate Qt's QKeySequence or even Qt:Key into vk_code or anything usable with windows' SendInput ?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Can you explain what you are trying to achieve with vk_code ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      R 1 Reply Last reply
      0
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi
        I have not seen such function.
        Seems only to map the other way, VK to Qt:key
        https://code.woboq.org/qt5/qtbase/src/plugins/platforms/windows/qwindowskeymapper.cpp.html

        1 Reply Last reply
        0
        • SGaistS SGaist

          Hi,

          Can you explain what you are trying to achieve with vk_code ?

          R Offline
          R Offline
          reonZ
          wrote on last edited by reonZ
          #4

          @SGaist I am trying to "type" some text in another application using windows SendInput function.

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            In that case, you have to write down a reverse map matching what Qt did.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            R 1 Reply Last reply
            1
            • SGaistS SGaist

              In that case, you have to write down a reverse map matching what Qt did.

              R Offline
              R Offline
              reonZ
              wrote on last edited by
              #6

              @SGaist I see, that is not really fun

              1 Reply Last reply
              0
              • R Offline
                R Offline
                reonZ
                wrote on last edited by
                #7

                Well i went a completely different way, i parse the QKeySequence::toString() using VkKeyScanExW and then use SendInput, it seems to be working quite well.

                1 Reply Last reply
                2

                • Login

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