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. Keyboard activity simulation in Linux

Keyboard activity simulation in Linux

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 1.1k Views 3 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.
  • CP71C Offline
    CP71C Offline
    CP71
    wrote on last edited by
    #1

    Hi everybody,
    I must simulate keyboard activity but I don't want to use external tools.

    My environment:

    • OS: Linux without keyboard

    Goal: My background application must send to the OS a pressed key event, in the hope application that has focus (No necessarily a Qt application) receives my key events.

    Alternative goal: My background application must send to QProcess a pressed key event, in the hope process (No necessarily a Qt application) receives my key events.

    Many thanks
    CP71

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      I don't know the answer, but can provide a hint: check out QtVirtualKeyboard module, maybe it does have some code for this (I'm not sure - it's entirely possible that QtVK only generates internal Qt events and does not touch OS for this).

      (Z(:^

      CP71C 1 Reply Last reply
      3
      • sierdzioS sierdzio

        I don't know the answer, but can provide a hint: check out QtVirtualKeyboard module, maybe it does have some code for this (I'm not sure - it's entirely possible that QtVK only generates internal Qt events and does not touch OS for this).

        CP71C Offline
        CP71C Offline
        CP71
        wrote on last edited by
        #3

        @sierdzio
        thank you for your answer.
        At the end I’ll change my way, but I keep the topic open because I’m still concerned in the topic, If it's not a problem.

        1 Reply Last reply
        0
        • Kent-DorfmanK Offline
          Kent-DorfmanK Offline
          Kent-Dorfman
          wrote on last edited by
          #4

          There are several open source keyboard/mouse emulation projects. They are often used to inject input in testing harnesses. A web search should yield results.

          The dystopian literature that served as a warning in my youth has become an instruction manual in my elder years.

          CP71C 1 Reply Last reply
          2
          • Kent-DorfmanK Kent-Dorfman

            There are several open source keyboard/mouse emulation projects. They are often used to inject input in testing harnesses. A web search should yield results.

            CP71C Offline
            CP71C Offline
            CP71
            wrote on last edited by CP71
            #5

            @Kent-Dorfman
            Thanks you,
            I know, but my curiosity is if there is a way to do this using Qt framework, because all projects that I found don't use Qt.
            Maybe someone has already done this by Qt.
            Only for curiosity ;)

            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