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 778 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.
  • M Offline
    M Offline
    Mijaz
    wrote on 15 Nov 2019, 10:54 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.

    J 1 Reply Last reply 15 Nov 2019, 10:56
    0
    • M Mijaz
      15 Nov 2019, 10:54

      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.

      J Offline
      J Offline
      JonB
      wrote on 15 Nov 2019, 10:56 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.

      M 1 Reply Last reply 18 Nov 2019, 03:15
      3
      • M Offline
        M Offline
        mrjj
        Lifetime Qt Champion
        wrote on 15 Nov 2019, 17:06 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
        • J JonB
          15 Nov 2019, 10:56

          @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.

          M Offline
          M Offline
          Mijaz
          wrote on 18 Nov 2019, 03:15 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.

          M 1 Reply Last reply 19 Nov 2019, 09:56
          0
          • M Mijaz
            18 Nov 2019, 03:15

            @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.

            M Offline
            M Offline
            mrjj
            Lifetime Qt Champion
            wrote on 19 Nov 2019, 09:56 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.

            M 1 Reply Last reply 20 Nov 2019, 04:06
            1
            • M mrjj
              19 Nov 2019, 09:56

              @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.

              M Offline
              M Offline
              Mijaz
              wrote on 20 Nov 2019, 04:06 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.

              J 1 Reply Last reply 20 Nov 2019, 05:32
              0
              • M Mijaz
                20 Nov 2019, 04:06

                @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.

                J Offline
                J Offline
                jsulm
                Lifetime Qt Champion
                wrote on 20 Nov 2019, 05:32 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

                1/7

                15 Nov 2019, 10:54

                • Login

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