Home
Home
Creating a "Kiosk" Browser in Netscape Navigator
Part 3 [Disabling the Short Cut Keys]
Mail Me!
Mail Your Comments!

One of the most common questions I get about running Netscape in Kiosk mode is:

"How do I disable the short cut keys?"

It is possible to disable the short cut keys -- however, this normally requires the used of a signed digital certificate -- this is part of the Netscape security model to prevent someone from entering malicious code into a web page and literally locking up your machine. Creating a signed digital certificate requires purchasing a certificate and using special software to sign it.

Fortunately, there is a method to "disable" the security model that allows you to disable the shortcut keys.
[Thanks to Robert J. Tiess for providing the instructions on how to disable the Netscape security.]

WARNING: Disabling the security model in Netscape leaves your browser [and the machine it is running on] vulnerable to malicious code -- use with caution and whenever possible, restrict its use to "trusted" sites.

Disabling the security and the hotkeys function takes a few simple steps.

1. Add the following lines to the WinOpen function of the Javascript code of your "kiosk" page:

netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserWrite"); - this allows the security model to be disabled.

hotkeys=no - this specifies that hotkeys should be disabled.

Example:

<script type="text/javascript"> <!-- function WinOpen(){ netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserWrite"); window.open("http://yourpage.htm", "", "status=yes, hotkeys=no, toolbar=yes, scrollbars=yes") timeoutID=setTimeout("WinClose()", 1000) } function WinClose(){ window.close() } //--> </SCRIPT> </head> <body onLoad="WinOpen()"> </body>

2. Start the browser with the "kiosk" page set as your home page. When it opens, a warning pop-up will appear requesting "additional privileges" to permit "modifying the browser". Check the box labeled "Remember this decision" and click on the button labeled "Grant".

This disables the security model and updates the prefs.js file by adding the following line:
user_pref("signed.applets.codebase_principal_support", true);

3. Lock-in the changes to the prefs.js file by setting it to "read-only". You will normally find the prefs.js file in the Netscape Users Directory in c:/Program Files/Netscape/Users/Default/prefs.js

4. Open up the Properties and select the read-only box.

5. You're done! Start up Netscape again and try to use any of the Control and Escape Key combinations such as CTRL-O and CTRL-N -- they shouldn't work. Be careful running this in Super Kiosk mode, you may discover that you have no way to close Netscape!

Related Resources
Kiosk Generator for Netscape Communicator 4.x

Written by Andrew Mutch.
Do you have a comment or question?
Last Updated July 28, 1999