views:

205

answers:

1

I have a script that on ONKEYDOWN event (e.g. Alt+f) it disables the default action that is to make browser to show its menu and make my custom action.

In IE8 event.returnValue does not do the job. I have also viewed that if I do alert(event.returnValue) the value is 'undefined' ad it seems as that property there isn't in the object but if I cycle the event object I found it.

Strange enough!

Maybe the browser access keys could not be disabled?

P.S. With Firefox all works! (with preventDefault())

+1  A: 

Although it is not possible to override behavior of "Ctrl+KEY" shortcuts (in IE), you can still override access keys. Use plain simple HTML for that.

<a href="javascript:;" accesskey="f"></a>

Hope this helps.

Sergey Ilinsky