I have a web-application in which I use accesskey
attribute to certain buttons. However I can't set alt + F accesskey
since it opens the File menu of the firefox. I have tried the following code
onkeydown = function(e){
if(e.altKey && e.keyCode == 'F'.charCodeAt(0)) {
e.stopImmediatePropagation();
e.stopPropagation();
return false;
}
}
It doesn't seems like working in firefox but works fine in chrome. All other alt key combinations can be overridden except alt+F (file menu), alt+E(Edit menu), alt+V(View), alt+S(History), alt+B(Bookmark), alt+T(Tools), alt+H(Help) in firefox.
I am running it in Ubuntu. Is there a way to do it? It should be working in both Windows and Linux.