Solved

Overriding IE keyboard shortcut keys

Posted on 2003-11-06
4
686 Views
Last Modified: 2008-03-17
Can I get script to override the IE browser shortcut keys like Ctrl+R (Refresh)?
I used onkeydown event for this it overrides if I use an alert function, however if I use some other function it executes the function and then executes the default refresh option. I want to disable the default option.


0
Comment
Question by:satish12577
  • 2
4 Comments
 
LVL 1

Accepted Solution

by:
FragMaster_B earned 50 total points
ID: 9740238
You can override some accelerator keys with various different methods. I don't think you'll ever be able to override them all tho. UNless what you're dealing with is an IE Application (HTA). Then you have much more power.

This page tells you what can an can't be canceled. http://msdn.microsoft.com/workshop/author/dhtml/reference/events/onkeydown.asp

You can whack a lot of accelerator keys by simply cancelling the "Ctrl" key. Inside your onkeydown function, you can cancel the "Ctrl" key like this...

if (event.ctrlKey || event.shiftKey || event.altKey){event.returnValue = false}

This script actually cancels any combination of alpha-key with Ctrl, Alt, or Shift. So, Ctrl+R, Ctrl+C, Ctrl+V... they're all canceled and do not respond.



0
 
LVL 27

Expert Comment

by:Asta Cu
ID: 10261447
Please finalize this or update us with what else is needed (since much time has passed since last update).  If one expert helped you, choose that comment to convert it to the accepted answer and flow points to close this.  If more than one expert helped you, choose the Split Points option to share the points among experts you choose.  Your feedback is integral and appreciated.  If you need special handling help, please make that request in the Community Support topic area, and include this question link.

Recommend checking with WindowsUpdate for a Critical Security Patch announced today.  Details here:
http://www.microsoft.com/technet/treeview/default.asp?url=/technet/security/bulletin/ms04-004.asp

Thanks,
Asta
0
 
LVL 27

Expert Comment

by:Asta Cu
ID: 10397791
satish12577,
No comment has been added lately (15 days), so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:

RECOMMENDATION: Award points to FragMaster_B http:#9740238

Please leave any comments here within 4 days.

-- Please DO NOT accept this comment as an answer ! --


Thanks,
astaec
EE Cleanup Volunteer
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

How many times have you been browsing the internet, with multiple tabs open, and closed the wrong one? Have you ever clicked 'Close all tabs' instead of 'Close current tab' ? Internet Explorer 8 now brings to you, what Firefox has had for a wh…
This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now