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. How to prevent keyboard events(win key,Alt,Ctrl,Esc) in main window?
Forum Updated to NodeBB v4.3 + New Features

How to prevent keyboard events(win key,Alt,Ctrl,Esc) in main window?

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 2.3k 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
    mohmo
    wrote on last edited by
    #1

    Hey bros,
    I have an Qt written application in full screen mode.Only a mouse an numeric keys are needed to deal with the application. I need to prevent the operator to close my application or open another program in the operating system.
    How is it possible??
    Thanks a lot.

    1 Reply Last reply
    0
    • Chris KawaC Online
      Chris KawaC Online
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #2

      This is highly platform and OS dependent task and as so is often beyond what a language like c++ can do. The best you could do is capture some keystrokes or system events but that's not nearly enough.

      For example on Windwos 8 you would need to disable the different overlays the system provides like charms (see my response in "another thread":http://qt-project.org/forums/viewthread/23607).

      Apart from that there is no way to enforce that at all if for example your app is running in a virtual machine, as the input can be reverted to the host at any time. There are many many more considerations.

      All in all it's a complicated problem and way beyond what Qt is for. Depending on the platform you might need a special application manifest, installation mode, app location, tweaking system settings/registry, using a dedicated "kiosk mode" providing software or other voodoo stuff.

      For an example how to setup a kiosk mode in Windows 8 see "here":http://blogs.msdn.com/b/hyperyash/archive/2013/10/25/enable-kiosk-mode-in-windows-8-1.aspx
      This requires system administration tasks and is beyond what an app can do on its own.

      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