How do you disable hotkeys in Internet Explorer 9?

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?


Solution 1:

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 ;)