You haven't answered the "WHY" part !

The keycode for the PrintScreen/SysReq key is 44. However, you will
not be able to trap it either in onKeyPress or onKeyDown events. You
*might* be able to catch it in the KeyUp event but by then the screen
has already been captured. A trick that you could apply however, would
be to clear the clipboard in the onKeyUp event. That would overwrite
the captured screenshot.

However, you are assuming that the user cannot use any of (the million
and freely available) screen capturing software available to take a
screenshot. Mozilla even provides addons to print screen. How will you
disable them ?

As I have said since time immemorial, don't publish something on the
web if you fear that someone will steal it.

On Feb 16, 12:39 pm, vikas arora <[email protected]> wrote:
> how can i disable prtscr key from my website because i can't generate the
> prtscr keycode
>
> On Mon, Feb 16, 2009 at 12:40 PM, Brandon Betances <[email protected]>wrote:
>
>
>
> > Why would you want to?
>
> > Yes, JavaScript can disable key presses. Sometimes when I go to certain
> > sites, I cannot copy text, like sites that test you. (MS cert tests, for
> > example.)
>
> > Not sure how to do though.- Hide quoted text -
>
> - Show quoted text -

Reply via email to