Click to See Complete Forum and Search --> : Trapping Key Strokes?


DougM
12-19-2002, 12:35 AM
Does anyone know how to trap the "Print Screen" key when it is pressed. I want to be able to stop users from copying graphics from a page. I have successfully disabled all the possible ways this could be done by using the onKeyDown event(which traps every key on the keyboard) & onMouseClick events to fire of functions that display a message box. This will stop them being able to activate drop down menus to copy/paste the contents. All other menu's and toolbars are disabled.

However, I cant find an event I can use that is fired when the "Print Screen" key is pressed. They can still press Print Screen and paste an image of the window into any other application.

Alternatively, is there a function I can use to flush/clear the clipboard, that I could call when the window looses focus?

Cheers

ShrineDesigns
12-19-2002, 02:34 AM
your graphics can still be stolen dispite what you do because you can't block the viewing of the source code

if you don't want them to get stolen don't put them on the net

khalidali63
12-19-2002, 09:41 AM
I don't think you can capture function key events with JavaScript.

:-(

Khalid

Beach Bum
12-19-2002, 09:54 AM
any picture viewed by the browser has already been downloaded to the user's machine. i can get it with a lot less effort than you will spend with ineffective tricks to try and protect it.

ShrineDeisgns had it right:

if you don't want them to get stolen don't put them on the net