3 If you have a real world kiosk application that you want to run on Google Chrome, then below are the steps to take to simulate kiosk mode.
6 ## Steps to Simulate Kiosk Mode
10 Compile the following Java code:
15 import java.security.*;
16 import java.awt.event.*;
18 public class FullScreen extends Applet
20 public void fullScreen()
22 AccessController.doPrivileged
24 new PrivilegedAction()
30 Robot robot = new Robot();
31 robot.keyPress(KeyEvent.VK_F11);
33 catch (AWTException e)
47 Include it in an applet on your kiosk application's home page:
50 <applet name="appletFullScreen" code="FullScreen.class" width="1" height="1"></applet>
55 Add the following to the kiosk computer's java.policy file:
58 grant codeBase "http://yourservername/*"
60 permission java.security.AllPermission;
66 Include the following JavaScript and assign the doLoad function to the onload event:
69 var _appletFullScreen;
73 _appletFullScreen = document.applets[0];
77 function doFullScreen()
79 if (_appletFullScreen && _appletFullScreen.fullScreen)
81 // Add an if statement to check whether document.body.clientHeight is not indicative of full screen mode
82 _appletFullScreen.fullScreen();