Click to See Complete Forum and Search --> : Hot keys


Tyrman
03-14-2003, 07:31 AM
Hot keys

Hi All!

I wrote a menubar script. It's works correctly with mouse. I'd like to improve it with hot keys. I can use keyboard events, except alt key. Because when I press alt the browser menubar get the focus. I tried to disable alt, but I wasn't able to do it. I find some information about, that is on operating system level, so it not possible. Is it true? If it is, then how can I get back the focus to my document? The document.focus() doesn't work. :-(
Please help me!

khalidali63
03-14-2003, 07:42 AM
Yo should be able to trap key events and the don't do anything when alt is pressed.

Numerical value returned by system when alt is pressed is 18.

Hope this helps

Khalid

Tyrman
03-17-2003, 01:13 AM
Thanks for help. I can use this fuction. :) And it1s possible disabble the browser hotkeys with these commands.

event.returnValue=false;
event.keyCode = 0;
event.cancelBubble = true;
return false;

:)))

Except altkey. :(((((

I thinking about, how could I make a trick what simulate i press twice the alt key. If I'd found it I'm going to post for you.