Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I just chanced upon a web page that seemingly remapped my default alt + f4 function to search on the website. When on that web page (a university webmail), whenever i press alt + f4, it goes to the search function rather than closing the browser.

How is this even possible? Being a university webmail, it is a fairly harmless effect (annoying but harmless) but if it can be remapped to open the search function, it could be remapped to do many other things. Is there any way to protect against this?

Using firefox 4.0, windows 7 x64.

share|improve this question

2 Answers 2

Using Javascript it's possible to check for events ( such as keypresses, specific keys) and remap them.

As for

it could be remapped to do many other things

Most modern browsers run Javscript in a sandboxed environment, so the capabilities are limited.

share|improve this answer

NoScript blocks against such key hijacking. You can finetune it to allow specific javascript functionalities.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.