473,406 Members | 2,281 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Capturing the 'Print Screen' keystroke event

Hi

I suspect this is not possible, and perhaps someone will explain why, but does anyone know how to capture the 'PrintScreen' keystroke (and/or the 'Ctrl-PrintScreen' event)?

I would like to be able to do this in IE6/7, and FF2 would be 'nice to have' but not essential. Other browsers are not relevant.

I would like to trigger a small piece of script when a user tries presses the PrintScreen key.

I have an on-screen display that I would like to render unprintable. I know how to block the clipboard function, but I don't like that sort of intrusive code. The script I have will simply clear data that the user has entered on screen - rendering the use of the printscreen function very inconvenient.

Many thanks

PS - I'm a relative javascript beginner - so be gentle with me please!
Feb 3 '08 #1
2 9888
mrhoo
428 256MB
PrtScn/SysReq key only fires onkeyup (44) in the window or a text field, so you cannot interrupt it. You can know that someone pressed it, but that seems like a small return for testing every keystroke.
Feb 3 '08 #2
acoder
16,027 Expert Mod 8TB
Instead of trying to capture the "Print Screen" key, just use print-media stylesheets. See, for example, this link.
Feb 4 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: YERVANT | last post by:
I would like use the Print Screen Button to copy a part of page using ASP. En fact, I use a data access page of a chart (pivot) created by access. And I would like copy only the chart. I think...
0
by: Vicente Nicolau | last post by:
Hello, I'm programming an application and I need to disable the print screen key. How can I do it? Can I use the UIPermissions to disable the print screen key? Thanks
2
by: Tim Marsden | last post by:
Is there a way of turning off or preventing the print screen function while my application is running. (VB.NET). Thanks Tim
3
by: Zlatko Matić | last post by:
Hello. I tried to print the current situation on the form/subform/subform...but it seems that Access prints all the records on all the subforms. I would like to print just the image (something...
0
by: melanieab | last post by:
Hi, I have a tabpage with a print button. This button tries to do a print screen, and it works fine the first time, but if I try to press print again, I get error: An unhandled exception of type...
2
by: toronto | last post by:
Seasons Greetings Everyone! I want to use JavaScript's event object to detect whether someone has pressed the 'PrintScreen' key to screenshot, via the Windows Clipboard, and to print website...
8
by: =?Utf-8?B?THVpZ2k=?= | last post by:
Hi all, anyone knows if is it possible to insert (and obviously save) a Windows print screen in a GridView cell? (ASP.NET 2.0). Thanks in advance. -- Luigi
3
by: Joe Duchtel | last post by:
Hello - I would like to create an application that starts up upon login (e.g. Startup folder) and then waits for the Alt+Print Screen button to be pushed. I still want this button to put a...
4
by: =?Utf-8?B?bjg=?= | last post by:
This may be the stupidest question ever, but how does the "print screen" work on Vista? I've tried every possible thing with Shift, Ctrl, Alt..... Still seeking the resolution.
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.