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. Can I control the function keys of key through qt Application?
Forum Updated to NodeBB v4.3 + New Features

Can I control the function keys of key through qt Application?

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 4 Posters 707 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.
  • MijazM Offline
    MijazM Offline
    Mijaz
    wrote on last edited by aha_1980
    #1

    I am designing a secured application.
    In my application I have removed the title bar of login page, so user can not easily exit the application. But I have qt4.8.7 crosscompiled through qws so user can easily exit the application by pressing Ctrl+Alt+F7. Therefore, I want to control the keyboard funtionality through my application.

    JonBJ 1 Reply Last reply
    0
    • MijazM Mijaz

      I am designing a secured application.
      In my application I have removed the title bar of login page, so user can not easily exit the application. But I have qt4.8.7 crosscompiled through qws so user can easily exit the application by pressing Ctrl+Alt+F7. Therefore, I want to control the keyboard funtionality through my application.

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @Mijaz
      You can recognise and act on key presses in a Qt application. But whether on your OS/window manager the key sequence is first handled outside of Qt/your application I cannot say.

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

        @Mijaz said in Can I control the funtion keys of key through qt Application?:

        Ctrl+Alt+F7

        In linux that will/might switch the active console. What does it mean on your system / context ?

        1 Reply Last reply
        2
        • JonBJ JonB

          @Mijaz
          You can recognise and act on key presses in a Qt application. But whether on your OS/window manager the key sequence is first handled outside of Qt/your application I cannot say.

          MijazM Offline
          MijazM Offline
          Mijaz
          wrote on last edited by
          #4

          @mrjj @JonB
          In my application I will just interface the keyboard to the baord through OTG. I just want control the funtionality of keybaord through my application.

          mrjjM 1 Reply Last reply
          0
          • MijazM Mijaz

            @mrjj @JonB
            In my application I will just interface the keyboard to the baord through OTG. I just want control the funtionality of keybaord through my application.

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @Mijaz
            I still have no clue what you mean / want :)

            So its android app and you connect a keyboard via OTG ?

            • . I just want control the funtionality of keybaord through my application.

            Im not sure that is poosible for an APP. you have to be a driver.

            MijazM 1 Reply Last reply
            1
            • mrjjM mrjj

              @Mijaz
              I still have no clue what you mean / want :)

              So its android app and you connect a keyboard via OTG ?

              • . I just want control the funtionality of keybaord through my application.

              Im not sure that is poosible for an APP. you have to be a driver.

              MijazM Offline
              MijazM Offline
              Mijaz
              wrote on last edited by
              #6

              @mrjj
              After delpyment my project to board, if I try directly write value or text in the application on board then it will not work. But if I will go through the following step then can enter text or value directly from keyboard connected to the board through OTG.

              Ctrl+Alt+F1
              cd / project_directory where you deployed your project.
              ./Your_project -qws

              Once user get into the application he/she can use the functionality of the application. I have disabled the "x"close mark of my application in order to trap the user into the application. User should not go out of the application without permission. I have created login for exit application to get close the application.
              But the main issue I am facing now: user can easily go out from the application by Ctrl+Alt+F7 without any login permission.
              How I can solve this issue? I thought, I should dissable the funtion keys after entered to the my application but not get any command to do that.

              jsulmJ 1 Reply Last reply
              0
              • MijazM Mijaz

                @mrjj
                After delpyment my project to board, if I try directly write value or text in the application on board then it will not work. But if I will go through the following step then can enter text or value directly from keyboard connected to the board through OTG.

                Ctrl+Alt+F1
                cd / project_directory where you deployed your project.
                ./Your_project -qws

                Once user get into the application he/she can use the functionality of the application. I have disabled the "x"close mark of my application in order to trap the user into the application. User should not go out of the application without permission. I have created login for exit application to get close the application.
                But the main issue I am facing now: user can easily go out from the application by Ctrl+Alt+F7 without any login permission.
                How I can solve this issue? I thought, I should dissable the funtion keys after entered to the my application but not get any command to do that.

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @Mijaz I'm quite sure you can't do this in Qt as Ctrl-Alt-Fx is handled by the OS.
                You will need to do it on OS level: https://askubuntu.com/questions/357039/how-do-i-disable-virtual-consoles-tty1-6

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                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