-
How to trap all keys
I have a quiz projector file in full screen. I want to prevent students from using keyboard shortcuts like alt+tab or the win key. I tried...
PHP Code:
fscommand("trapallkeys", "true");
but it doesn't lock enough keys. I tried...
PHP Code:
stage.addEventListener(KeyboardEvent.KEY_DOWN, myKeyDownWIN);
function myKeyDownWIN(e:KeyboardEvent):void {
if (e.keyCode==Keyboard.TAB) {
fscommand("quit","true");
}
}
but it doesn't prevent alt+tab. I'd appreciate any help.
-
Lifetime Friend of Site Staff
You're going to need some outside help, most likely from a third party swf2exe tool that can trap keys that Flash can't. I make one of those tools (SWF Studio) and in SWF Studio there's a checkbox on the Defaults Tab to start the application in kiosk mode.
Kiosk mode disables the special Windows keys, Alt+F4, Ctrl+F4, Ctrl+Esc, Alt+Tab, Alt+Esc, PrtScr, Alt+PrtScr and Ctrl+Alt+Del. You would enable kiosk mode when you have to run your applications in unattended environments and don't want to allow users to access Windows.
The Ctrl+Alt+Del key sequence cannot be reliably disabled under Windows NT, 2000 or XP unless you are running from an account with administrator privileges. If you need to secure an application for kiosk mode on a systems where the login account does not have admin privileges, you will have to modify the registry. See the article Securing Windows for use as Dedicated Kiosks for detailed instructions on how to accomplish this.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|