?
Solved

Overriding IE keyboard shortcut keys

Posted on 2003-11-06
4
Medium Priority
?
740 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 200 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

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
SSL stands for “Secure Sockets Layer” and an SSL certificate is a critical component to keeping your website safe, secured, and compliant. Any ecommerce website must have an SSL certificate to ensure the safe handling of sensitive information like…
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…
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 +…

777 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