Disable printscreen key

You know, I don’t think this whole disable print screen key thing is really the healthiest approach. I kind of take offense to a browser trying to hijack my print screen key. The print screen key is really the OS’s business and not something the browser should have control of, and if the browser let’s that happen, then there’s something wrong with the browser IMO.

The best approach is to use low-res images, and put watermarks on them and to stress that the images are copyrighted (ex. Corbis.com). That’s really as far as it needs to go.

Remember the latest ploy by the record industry to disable the reproduction of CDs, and wasn’t it that someone found you could disable the protection mechanism by simply holding the shift key while booting the CD?

Another deal would be to have a JS alert box, come up when someone clicks the print-screen key, that says: Please kind sir, don’t copy these images" and that still allows the print screen key to work as expected, because it should.

Also, as a joke you could capture the shift key and build in a function that prompts the user to download the entire site LOL :slight_smile: Your client would be happily browsing around and happen upon the magic key, and be like WTF! You would respond (with a practiced web guru tone) double-damn those blasted browser bugs Jim – didn’t you know about the shift-key security issue… J/K about all of this of course.

Obviously I’m warrant to go off about the geekiest subjects. (this post was mainly for entertainment value)

Yes, it’s bad to disable the print screen key. But does anyone know how to actually do it? I want to know how to do it, not why I shouldn’t do it. Any takers? : )

Wow…old thread. Anywho…if you had read closely…you would have read that it is done using javascript. But for people that have javascript disabled, it won’t work. So there is no way to truely disable it.

I did read the thread closely, and I noted that although the use of JavaScript was alluded to, no actual JavaScript was shown. Hence, my question, again, “does anyone know how to actually do it?”

You want to go throught the trouble of doing something that doesn’t work?

While you can’t technically stop someone from using a design they get off of your pages elsewhere you can make them think twice about wanting to do it. The designs are in digital form. As such they fall under the DMCA. Simply put a notice along with the image saying that the design is protected by the “Digital Millennium Copyright Act” and that unauthorized use of the design is subject to fines of _____ per infraction. I don’t know what the figure is in relation to what you are doing, however, in the building industry I’ve heard of architects who have successfully sued individuals who built a home based on their designs under the DMCA to the tune of $100,000.

The verbiage I use underneath the graphics of floor plans on one site Imanage that sells log home kits is:

COPYRIGHT NOTICE: The use of this drawing and the home design herein is strictly controlled by US copyright law. This drawing and design may not be copied, emulated or referenced without prior written approval by ******* Log Homes. All violations will be prosecuted to the fullest extent of the law at a minimum of $100,000 per incident.

From my understanding of what I have heard architects say, this threat is enough to make many builders and competitors get cold feet about using the plans.

While no website can be 100% secured, for some clients whose livelihood is based on the images they sell on their site, even a paltry 20% increase in security is worth it to them. Of course it’s not the best way to do things…bumblebees aren’t supposed to be able to fly, either…but sometimes you need to take less-than-ideal action to please the client. So once again, does anyone have the actual, “working” code?

Security through obfuscation is not security. All it does is give one a false sense of being. As others have said, there is nothing anyone can do to stop the end user from printing out the context of their screen. From my understanding, the print screen button is an operating system level control outside of the scope of JavaScript.

Lets list the things you would have to break to prevent someone from printing out a design on one of your webpages:

  1. right mouseclick,
  2. select all and copy (via menubar; [ctrl]+[A] & [ctrl]+[C])
  3. drag and drop (via left mouseclick and drag)
  4. print screen button
  5. print (via menubar and [ctrl]+[p])
  6. view source
  7. image properties
  8. retrieving images from cache.

Now lets complicate this by the common flavors of web browsers

  1. MSIE 6.0
  2. MSIE 5.5
  3. MSIE 5.2 (Mac)
  4. MSIE 5.0
  5. Mozilla
  6. Mozilla Firebird
  7. Opera
  8. Safari
  9. do I need to mention more?

Now lets consider OS variations:

  1. WinXP, 2000, NT
  2. Win9x
  3. Mac OS X
  4. Linux

Now let’s consider you have to overcome the end user’s ability to turn off JavaScript.

Stopping someone from printing an image from a webpage is not practical nor even remotely capable of truly being successful. All implementing any that “prevents” this does is give the non-informed a false sense of security, which is disingenuous.

Yes, this is all valid.

But to get back to my original question…does anyone know the actual method? And if it’s not JavaScript, then what? I’m really interested to hear from someone who has actually done this, and not just people who have many reasons for why they’ve never done this.

Ah, I’ve found an answer. You just need to embed an ActiveX script on your page that will disable the user’s clipboard.

This is obviously a very ugly solution, and reaffirms the point everyone has made that it shouldn’t be done. However, for the sake of pure knowledge I’ve wanted to know how it’s done, and now I do. Case closed? Sheesh, what does it take to get a direct answer 'round here? ; )

One day you may find yourself a contestant on some geek trivia gameshow, and they’ll ask you “how do you disable the print screen key”, and now you’ll have an answer to that question, for $500.

I have HTML Guardian from protware.com to encrypt and protect Images. It works pretty well.

It does disable Print Screen plus many more things

BUT with a screen capture program one can always dump the video memory.
And there are setting in windows which can keep the Print Screen enabled and not disableable by software methods even HTML Guardian fails there.

I came across this thread via search. I know its way old, but just in case someone is still subscribed to it…

I agree with Crunch42: Sometimes I just want to know how to do something and it annoys me that no one will just answer the freakin’ question.

Here’s the code I found:

<script language="JavaScript" type="text/JavaScript">
document.attachEvent("onkeydown", my_onkeydown_handler);

function my_onkeydown_handler(){

  switch (event.keyCode)
    case 122 : // 'F11'
    event.returnValue = false;
    event.keyCode = 0;

Here’s the site it came from: http://www.alphafilter.com/?inc=article&aid=69

When people ask how to do things that will take you hours to implement, drive visitors away from their site, and which can be bypassed completely in under two seconds there seems to be little point in telling them how to do it.

Any attempt to block anything on your web site will block your legitimate visitors from using your site so they will leave and will have no effect on the thieves who all know how to bypass it all. Such code on your site demonstrates that the site was created by a novice. You wont find such stupid “protection” on any professional web site.

If you disabled Print Screen, couldn’t you just open a small program over your browser window, focus it, and hit Print Screen?

Simplest fix if someone disables anything in your browser from Javascript is just to enable it again yourself. If you don’t know how to reenable something specifically then just disabling Javascript in the browser temporarily will do it.

Nothing can protect your page content. HTML Guardian from protware.com can be completely decrypted in about one second - it is a complete waste of money as is any other code that you buy to “protect” your page…

As has been said so many times in the past, I have never seen a trick that can truly stop someone from copying, printing or doing a screen capture of a webpage. Sure some things might be able to trick MSIE using JScript, but Firefox, Opera and Safari are a different story.

“Solutions” people try to hawk that supposedly protect one’s content from being copied, etc. are nothing more than snake oil tricks that give the buyer a false sense of security.

This is the only copy protection for the web that works…

Do a search for CopySafe Web

I’m surprised that it hadn’t been mentioned because it’s been available for about 10 years.

It is no nore secure for protecting web page content than any of the other methods mentioned. It is impossible to stop someone copying your web page content so any program that claims to be able to do so is lying or has been written by someone who doesn’t realise how easily the protection that they spent all that time creating can be bypassed.

An example of how easy it is to bypass, is to use a virtual machine to view the protected page. Yes, you’re forced to install a plugin that takes draconion control of your computer while viewing the protected page, but it’s just a shell game. Even with all of that protection, there’s no preventing you from doing that while inside of a virtual machine. Then you can use the host operating system, the one that’s running the virtual machine, the take a screenshot of the virtual machine itself, which includes the hevily protected content.

What other bypasses did you have in mind, Felgall?

Obviously you didn’t try it and are citing fresh air.