/    Sign up×
Community /Pin to ProfileBookmark

Disable F11 key in IE

I need a script to disable the F11 key in the Internet Explorer browser

to post a comment
JavaScript

7 Comments(s)

Copy linkTweet thisAlerts:
@pyroMar 21.2003 — You can't disable the browser hot keys...
Copy linkTweet thisAlerts:
@vampyvampireJul 16.2007 — Here is the Script to Block / disable F11 Key

<SCRIPT LANGUAGE="JavaScript">

function onKeyDown() {

if ( (event.altKey) || ((event.keyCode == 8) &&

(event.srcElement.type != "text" &&

event.srcElement.type != "textarea" &&

event.srcElement.type != "password")) ||

((event.ctrlKey) && ((event.keyCode == 82)) ) ||

(event.keyCode == 122) ) {

event.keyCode = 0;

event.returnValue = false;

}

}


</script>

<body onkeydown=onKeyDown()>

</SCRIPT>
Copy linkTweet thisAlerts:
@Tweak4Jul 16.2007 — 
  • 1. The code vampy posted is easily defeatable by a wide variety of surfers, and while it may stop [I]some[/I] people from using the F11 function, it definitely will not stop [I]all[/I], or possibility even [I]most[/I] of them.


  • 2. The above code does not address the fact that someone could just as easily select View>Full Screen from their menu bar. The people that don't know how to disable the above script manually are also the ones who are less likely to know the F11 shortcut even exists, thus rendering the script even more useless.


  • 3. Attempting to disable built-in browser functionality is a sure-fire way to piss off users and ensure that they leave your site as quickly as they can, and only return if there is no other option. It is a very bad habit to get into, and if your site requires such hack code to function, then you really need to go back and improve your over-all site design, rather than trying to take away legitimate user abilities granted to them by their browsers.
  • Copy linkTweet thisAlerts:
    @thechasboiJul 16.2007 — Tweak4 has a few points all be harshly stated but points none the less. I do the same support of browser fixing on my site as well. Some times a browser does not do what you desire or need it to do so in order for the people on my site to use it they need to put up with the two limitations from the browsers problems. What I mean is that ff and flash in mac have a problem in a certain mode for the browser and the flash it self so if these two combinations happen in my editor the user is given something a little different than what they might expect but a note is given to explain why this is happening. Well enough with the goings on and Hope this helps.
    Copy linkTweet thisAlerts:
    @Tweak4Jul 16.2007 — Yeah- sorry about that. I tend to get a little frustrated when the same sorts of topics come up again and again.


    This one falls nicely into the "disabling browser functions that you have no right to disable and can't do reliably anyway" category, right next to those useless no-right-click scripts that people who don't know any better think protect their images and source from evil hackers.
    Copy linkTweet thisAlerts:
    @felgallJul 16.2007 — Most browsers these days give the browser owner the ability to disable access to those things that interfere with their browser functionality while still allowing JavaScript to run in the web page.
    Copy linkTweet thisAlerts:
    @mrhooJul 17.2007 — How about making the f11 key in IE close IE and open firefox....
    ×

    Success!

    Help @nandosabbath 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.1,
    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: @meenaratha,
    tipped: article
    amount: 1000 SATS,

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

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