Solved

Overriding IE keyboard shortcut keys

Posted on 2003-11-06
4
737 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

#Citrix #Internet Explorer #Enterprise Mode #IE 11 #IE 8
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…

691 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