/    Sign up×
Community /Pin to ProfileBookmark

Disable ALT + TAB

Hi all..

I want to disable ALT+TAB key combination on my webpage to avoid people using any other application while using my application while working on my website.

to post a comment
JavaScript

22 Comments(s)

Copy linkTweet thisAlerts:
@grin_tFeb 27.2007 — It sounds interesting and, a rather challenge job.

In my opinion, install malware (or sth. like that) on to the client is the only way that can accomplish the task.
Copy linkTweet thisAlerts:
@felgallFeb 27.2007 — Fortunately web browser security doesn't allow such interference with computers unless the person trying to break in first succeeds in getting their trojan installed onto the computer in order to gain access to do such annoying things and decent antivirus programs will block the trojan from ever getting installed.

Even programs running on the computer itself normally can't do that without the computer being specifically configured to allow it and no one with any sense would do that. Web pages can't do anything outside the web page without permission fortunately and so it isn't even a consideration that anyone need worry about having to block.

Why not install an operating system that exhibits the behaviour you want such as DOS. That is about the only way to disable that key combo without badly corrupting the operating system.
@RevealedFromToday, while visiting quantas.com, somehow I was redirected to an unknown web site. The browser went into full screen mode, the screen showed an obviously faked message about System Critical Failure, and a machine voice kept repeating to not reboot the computer or all data will be lost etc. There was an phone number on screen to call. From past reports, I think the "support person" at the other end of the line will guide me to install VNC or equivalent and then plant a keyboard logger. My PC was almost totally locked out. Esc couldn't restore the browser, Alt-tab didn't work either. Only Ctrl-Alt-Del worked. How can a web page take over control in this manner? What features of the browser or Html or Javascript is it using?Jan 30.2024(updated)
Copy linkTweet thisAlerts:
@viresh_madanauthorFeb 27.2007 — It will be gud if anybody can tell me how to disable ALT key. Even if one key is disabled, i guess the combination wont work.
Copy linkTweet thisAlerts:
@viresh_madanauthorFeb 27.2007 — It will be gud if anybody can tell me how to disable ALT key. Even if one key is disabled, i guess the combination wont work.
Copy linkTweet thisAlerts:
@mrhooFeb 27.2007 — Maybe you could make your site interesting. That is really the only way to keep people there.
Copy linkTweet thisAlerts:
@LeeUFeb 27.2007 — Disabling a visitor's computer is a sure way to get people to NOT return to your site. Many people work on several things at once and there is nothing that important on the Internet that can't be interrupted for a minute or two. mrhoo is right. Make your site worth paying attention to.
Copy linkTweet thisAlerts:
@slaughtersFeb 27.2007 — It will be gud if anybody can tell me how to disable ALT key...[/QUOTE]No.
Copy linkTweet thisAlerts:
@foid025Feb 27.2007 — viresh.madan,

obviously, people aren't taking your post too well... you gotta understand that what you're asking is breaking one of the first rules of good programming. well actually it probably breaks all the rules of good programming. but nonetheless maybe we can help you.

what is it that you want your program to do? why is it that you want alt tab disabled so bad?? maybe your end goal is perfectly justifiable, and you just picked a terrible way to get there. give us some more information and maybe we can help.
Copy linkTweet thisAlerts:
@felgallFeb 27.2007 — Trying to break the operating system functionality from a web page is the worst thing you can try to do. There have been many hundreds of security patches made to operating systems to block such actions whenever holes that would allow it can be found because that level of access allows you to completely trash their computer or take it over for your own use. Your web page should restrict itself to the way the page works and not try to change your visitors carefully selected browser and operating system settings which they already have set the way that they want.

You CAN disable key combinations from the code in your web page BUT those key combinations handled by the operating system are handled by the operating system and never get to the browser. Also people can configure their keyboard shortcuts differently so that the key combination you disable may not be the one they use to do what you are trying to block anyway.
Copy linkTweet thisAlerts:
@UltimaterFeb 27.2007 — Hi all..

I want to disable ALT+TAB key combination on my webpage to avoid people using any other application while using my application while working on my website.[/QUOTE]

If this is gonna be for an online test of some sort, maybe the following will find favor in your eyes
<i>
</i>&lt;script type="text/javascript"&gt;
onblur=function(){
location.href="cheater.htm";
}
&lt;/script&gt;

However stopping cheaters from using another computer to browse the web so they can't cheat isn't gonna happen.

Could also try something like:
<i>
</i>&lt;script type="text/javascript"&gt;
setInterval("window.focus()",100)
&lt;/script&gt;

Good luck getting it to work in Firefox :p
Copy linkTweet thisAlerts:
@felgallFeb 28.2007 — Just remember that since blur is only in the standards for form type elements and links that a lot of browsers that follow the standards therefore don't implement it for windows.
Copy linkTweet thisAlerts:
@viresh_madanauthorMar 01.2007 — Hi all..

Yes u guessed it right.. its an online examination system and i want to avoid cheaters to look into google and search the answers and blur also works but also spoils the things as i only want to disable alt+tab... see if u cud help me....
Copy linkTweet thisAlerts:
@felgallMar 01.2007 — You will need to write your own operating system and convince people to use that instead of Windows in order to achieve what you want. The way windows is designed to work you have a better chance of flapping your arms and flying to the moon than of being able to change that windows functionality without corrupting the operating system so as to require a complete reinstall of everything on the hard drive.
Copy linkTweet thisAlerts:
@slaughtersMar 01.2007 — Hi all..

Yes u guessed it right.. its an online examination system and i want to avoid cheaters to look into google and search the answers and blur also works but also spoils the things as i only want to disable alt+tab... see if u cud help me....[/QUOTE]
I'm sorry - I can't see how disabling alt+tab will help in the slightest if your intent is keep people from searching for answers to an online test.

You're not interested in keeping people from looking at Google by using the two most common methods around.

  • - Clicking Start->Internet on their Windows XP Taskbar to launch another web browser

  • - Clicking on the web browsers minimize icon then bringing up another browser


  • You are just interested on how to disable alt+tab so no one can escape the page you are making them look at. That just sounds wrong.
    Copy linkTweet thisAlerts:
    @ToonMarinerMar 01.2007 — One of the latest jobs at work has been an online assessment system for recognized certificates - as such the awarding bosy only allow the test to be taken at a test centre. This means that anyone can go to any test centre and take the exam - providing the centre is registered on the system.

    Some say 'why not just sit the paper exam then?' but that doesn't mark itself and people may not have such a flexible choice (especially for more specialized courses) in where they can take te exam.

    I am by no means a javascript guru - in fact I am not even as a good as a 2 day noob but you could possibly including some timing in the application. If possible you could record the length of time the window does not have focus or is minimized for each question - any spending 4 minutes on a question of which 3 minutes is spent looking at a different app/window could be cheating. Or (if the same is possible) when then user uses another app or minimizes the window they are disqualified from the test (you'd have to tell them that first though!)
    Copy linkTweet thisAlerts:
    @toicontienMar 01.2007 — This sounds like a job for an application, not a Web page. Perhaps Java or maybe even a standalone Flash file? Just thinking of something that would have good network connectivity, ample access to the operating system and be platform independent.
    Copy linkTweet thisAlerts:
    @trepidityMar 01.2007 — Dude, no offence but I would quit trying. If your trying to dissallow that for that reason I understand the idea. But fact of the matter is it can't be done. The will always be a way around it, or else there is a security flaw in the OS and/or browser it is working in. The only way to really accomplish not allowing "cheating" is to have full control of the network they are accessing from, or force access from a OS you wrote for the purpose like mentioned above. You could maybe write a server-side program on the computer acting as a router for a network that upon loging in to the site dissallowed all network traffic from a particular IP other than that pertaining to your site. But that would be complicated, annoying to users, and requires that they use a PC behind that particular router(they would have to be on location). Plus if they just change the IP address, or use another PC they have gotten around it again. The only truly effective way to avoid cheating is to physically watch the person while they test, defeating the purpose of online classes. Even in modern classroom based enviroments students are not allowed to bring electronic devices included certain calculators. I remember all the way back to Algebra in the 6th grade, alot of us had TI-89's or other programable calculators, in which you could write functions to do most of the problems on the test, as well as print out full text information on any subject you could fit in the memory. I wrote a program that used an external device to wirelessly chat like an SMS system does. That's why certain calculators aren't allowed on certain sections of the SAT.

    In short, you can't. If the student really wants to cheat they will find a way. Not saying that's a good thing, kinda sucks but it's really just a fact of reality.
    Copy linkTweet thisAlerts:
    @foid025Mar 02.2007 — actually - though i dont know if this thread is still being read by its owner... the thing suggested by ToonMariner sounds rather smart. Sure there will be workarounds, but it sounds like the best possible solution without getting complicated and going server side. You would just have to make sure your thing works for all major browsers.

    otherwise, why not just check the ip logs after each test? that way you can see if a user went to an illegal page or not. might that not be doable?
    Copy linkTweet thisAlerts:
    @trepidityMar 02.2007 — Yeah you could do a combination of that, an application, and what toonmariner said. The only thing with that is again they would have to test at a centre to check IP logs. When the app looses focus, you could record that. But you would do like was said and tell them not to click on anything outside the app. In the event that the app looses focus you could log that, and if so check the ip's log. But that's about all you could do. You wouldn't want to disqualify someone for accidentally clicking outside the app, or accidentally hitting the windows key if the OS was windows. But the best option really is to time the test, or each question depending on the maximum estimated time for completion. If they don't know the answer after that ammount of time then it is fair to assume that they just don't know it. And it would hopefully not give them time to look it up. The thing about testing a centre though is you can easily restrict access to certain applications for users. I think the issue pertains to an actual site accessible from any computer. In that case you would want to write a standalone application(possibly in java to avoid having to rewrite, recompile and test for every OS), not a website. But if he wants a website then we can't do any of those things besides timing the test, and you would of course do that server-side, maybe using javascript to tell the server each time a question is complete if they are all on one page.
    Copy linkTweet thisAlerts:
    @Arty_EffemMar 02.2007 — Hi all..

    Yes u guessed it right.. its an online examination system and i want to avoid cheaters to look into google and search the answers and blur also works but also spoils the things as i only want to disable alt+tab... see if u cud help me....[/QUOTE]
    An online examination is valid only when held in a controlled environment, in which it should be possible to disable internet access.
    Copy linkTweet thisAlerts:
    @SumDeusJul 21.2010 — An online examination is valid only when held in a controlled environment, in which it should be possible to disable internet access.[/QUOTE]

    Hello everyone! I too would like to know how you disable internet access at higher tier levels of security while keeping it going on the most untrusted one. It should be as possible as the original poster coming back from ****ing goats and chickens to learn to speak proper English.
    Copy linkTweet thisAlerts:
    @KorJul 21.2010 — Hello everyone! I too would like to know how you disable internet access at higher tier levels of security while keeping it going on the most untrusted one. It should be as possible as the original poster coming back from ****ing goats and chickens to learn to speak proper English.[/QUOTE]
    If you decided to exhume an old thread, you should, at least, have something interesting to say about the matter. If not, you should better leave the old corpses rest in peace ?
    ×

    Success!

    Help @viresh_madan spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 6.17,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @nearjob,
    tipped: article
    amount: 1000 SATS,

    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,

    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,
    )...