Thursday, December 17, 2009

How do I disable all keys on keyboard except letters and numbers?

Can any of you tell me how to disable all keys on the keyboard, right mouse button, print screen, and front tools/view and I would also like to know how to disable the back way so that people won't copy my source code on my website that I'm making.How do I disable all keys on keyboard except letters and numbers?
You can't. You can use JavaScript to disable right click (and really you're not disabling it, you're just catching the event) and catch certain keyboard keypress events, but you can't disable printscreen or tools/view (View Source). If it were possible to actually disable those things, malicious web sites would do it constantly, which is why you can't actually ';disable'; things like that.





If someone really wanted to steal your sourcecode and were web savvy, they could easily do it even if you could find a way to disable those things. If you put it online and it's worth stealing, it will be stolen.

No comments:

Post a Comment