How do you disable hotkeys in Internet Explorer 9?

7,718

You can disable any hotkeys by using an AutoHotkey remapping script. Instead of assigning a command to an AutoHotkey hotkey, you just tell it to do nothing.

You paste the code below in an editor like Notepad and save the file with an .ahk ending. Name it something like "Disable hotkeys.ahk".

If you convert the file to exe, you won't even need AutoHotkey to be installed or run as a portable app. Your script is then a standalone app you can distribute.

No one will know what happened. To kill the ahk script, you would need to kill the process AutoHotkey.exe manually in the Process Manager. If you have an exe-file, the name of the process corresponds to the name of the exe file

In order to launch it automatically when windows starts, you can do one of the following:

  • Save it in the all users statup folder (C:\Users\All Users\Microsoft\Windows\Start Menu\Programs\Startup).
  • Create a task with the task planner that will launch the script at startup.
  • Use any other method you can think of to launch the script.

    ; If you don't want the kids to know there is a script running, enter this command at the top of the script.
    #NoTrayIcon
    
    ; If you only want to disable hotkeys in Internet Explorer, you need to enter this command at the top. If you do not enter it, it will block all hotkeys in any program.
    #ifwinactive ahk_class IEFrame
    
    ; Enter every hotkey that you want disabled in AutoHotkey Syntax
    ; http://www.autohotkey.com/docs/Hotkeys.htm
    ; Run this script at startup
    
    ^a:: ; this stands for Control-a
    F9:: ; this stands for F9 (caret browsing)
    F10:: ; this stands for F10 (alternative to alt)
    LControl:: ; this should disable all hotkeys with the left control key 
    RControl:: ; this should disable all hotkeys with the right control key
    LAlt:: ; Same for Alt
    RAlt:: ; Same for Alt
    LWin:: ; Same for Winkey
    RWin::
    Lshift:: ; you get the picture
    Rshift::
    WheelUp::
    WheelDown:: ; This stands for the Scroll Wheel down command
    

I've tested both the ahk and exe versions of this script and they work as they should. Though I strongly recommend that you test on your machines before deploying. The only way to prevent the script for starting would be to boot the computer in Safe Mode. Keep in mind that the kinds might to research on their own and that they might find this post ;)

Share:
7,718

Related videos on Youtube

JonathanEyre
Author by

JonathanEyre

Updated on September 18, 2022

Comments

  • JonathanEyre
    JonathanEyre over 1 year

    My school is trying to provide HTML5 video to students. The computers are locked down so that nothing can be done except Internet Explorer 9, and even Internet Explorer 9 is locked down with a proxy. These are computers that we can do anything to to lock them down, so this isn't just a JavaScript question.

    The students regularly use the hotkeys to zoom in, fast forward video, and other annoyances.

    Are there any registry settings, or any other ways to disable all Internet Explorer 9 hotkeys?

    • uxout
      uxout over 12 years
      Is there some particular reason you don't want them to be able to ZOOM? That seems counterintuitive...why would they be doing it unless they felt it necessary?
    • JonathanEyre
      JonathanEyre over 12 years
      Because they want to play or makes sites unusable. Also, the teachers rarely know how to set it back. The students are usually better at computers than the teachers.
    • uxout
      uxout over 12 years
      I got the impression they were older than that; sorry for what probably sounds like a silly question, then.
    • Harry Johnston
      Harry Johnston over 12 years
      How about disabling or removing the keyboards, do they need them?
    • JonathanEyre
      JonathanEyre over 12 years
      Sadly, removing the keyboards is not an entirely viable option. They are school laptops.
    • Harry Johnston
      Harry Johnston over 12 years
      Jonathan: the keyboards can be disabled in software, if the students don't need to use them.
  • JonathanEyre
    JonathanEyre over 12 years
    I would rather not install AutoHotKey. However, I know that you can compile ahk scripts as exe. Do you think that would work as well? Also, does the student user have to run it in startup, or can it be run from the SYSTEM user (with Task Scheduler) and still apply to the student? All programs are restricted by parental controls.
  • user 99572 is fine
    user 99572 is fine over 12 years
    I have edited my answer to take into account your remarks. However, I don't know how parental controls work and what they do with respect to scripts and such.
  • user 99572 is fine
    user 99572 is fine over 12 years
    Thanks for the upvote. But your Question was: How do I disable hotkeys in Internet Explorer 9? I provided an answer to this question, IMHO. But it's okay, no hard feelings.
  • ar.gorgin
    ar.gorgin over 10 years
    Can i use this for on-screan keyboard?