Results 1 to 20 of 25

Thread: disable alt+tab

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2010
    Posts
    86
    Thanks
    10
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default disable alt+tab

    I want to disable the alt+tab combination, that's, the user can't bring another application on the top instead of my application, so my application remains on the top.

    how to do that?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: disable alt+tab

    Wouldn't it be better to ask the following question?

    "How do I make my application stay on top?"

    Alt+tab is not the only way to switch applications, you know...

    http://catb.org/esr/faqs/smart-questions.html
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jun 2010
    Posts
    86
    Thanks
    10
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: disable alt+tab

    it's ok, how to make my application stay on top ?

    (btw. I asked the specific question to simplify my problem to gather as much as answers it can, coz a few people tried to make apps always on top, but sure, more people tried to listen to and disable events, which isn't necessarily (alt+tab) )

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: disable alt+tab

    Quote Originally Posted by ahmdsd_ostora View Post
    it's ok, how to make my application stay on top ?
    Set a Qt::WindowStaysOnTopHint flag on your window. Setting the window to full screen mode might be helpful too.

    (btw. I asked the specific question to simplify my problem to gather as much as answers it can, coz a few people tried to make apps always on top, but sure, more people tried to listen to and disable events, which isn't necessarily (alt+tab) )
    Asking about alt+tab does not simplify your problem. The fact that you know a solution that does "more or less what you want" doesn't make your actual problem any simpler.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: disable alt+tab

    Note, also, that giving a hint for a window to stay on top won't always work; such behavior is dependent on the underlying window manager, and not all of them support such things.

    Note too that an application that can't be gotten out of the way has the potential to be incredibly annoying to many users. Think very hard about whether you want to pursue this approach; it runs counter to most UI guidelines.

  6. #6
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: disable alt+tab

    Secondly, on Windows XP and above, pressing the "Windows Key" will automatically remove your applications "stay on top" flag and allow access to the task bar and start menu. On Windows 7 you can also forcibly resize any application to stop it hogging the entire desktop by using the task bar.

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: disable alt+tab

    In other words, install an X11 system and run your app without a window manager And seriously what we are looking for here is 'kiosk mode'.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  8. #8
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: disable alt+tab

    In another topic where he asks more or less the same question (topic:"Lock screen") his target OS is Windows, so I don't think he wants to install X11

  9. #9
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: disable alt+tab

    If he wants to annex the whole system for his app, then what difference does the OS make?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  10. #10
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: disable alt+tab

    How he's going, he's going to need a system level driver to hook into the input stream and prevent certain events from reaching the OS, so he'll need to decide on an OS first. Unless of course he decides to rewrite the BIOS and stop everything there

  11. #11
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: disable alt+tab

    And certainly the whole topic is out of scope of this forum...
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  12. #12
    Join Date
    Jun 2010
    Posts
    86
    Thanks
    10
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: disable alt+tab

    Quote Originally Posted by SixDegrees View Post
    Note too that an application that can't be gotten out of the way has the potential to be incredibly annoying to many users. Think very hard about whether you want to pursue this approach; it runs counter to most UI guidelines.
    The user will be pleased if this feature succeeds. It's a lock screen, friend.


    Quote Originally Posted by wysota View Post
    Set a Qt::WindowStaysOnTopHint flag on your window. Setting the window to full screen mode might be helpful too.
    This flag is working unless the OS forced the application to be behind. It cannot be used here.

    Quote Originally Posted by fatjuicymole View Post
    Indeed. I've tried to push him in the right direction, but maybe he doesn't like doing research.
    1- immitating a screen saver will not allow me to add a password edit field, I found an action that runs a secured screen saver but it doesn't work on xp .
    2- This requires admin access.
    3- will break the portabily even if my current target is Windows.

Similar Threads

  1. How to disable enter
    By phillip_Qt in forum Qt Programming
    Replies: 11
    Last Post: 23rd August 2012, 07:52
  2. How to disable ALT + F4
    By elizabeth.h1 in forum Qt Programming
    Replies: 19
    Last Post: 22nd June 2010, 22:05
  3. How to disable keyboard
    By garry_3peace in forum Newbie
    Replies: 9
    Last Post: 27th October 2009, 04:17
  4. how to disable Alt F4 combination
    By omprakash in forum Qt Programming
    Replies: 3
    Last Post: 17th August 2008, 20:18
  5. Disable Tab Key
    By otortos in forum Newbie
    Replies: 6
    Last Post: 25th March 2006, 16:27

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.