XUL shortcut keys

Posted by jaswanttak on Stack Overflow See other posts from Stack Overflow or by jaswanttak
Published on 2010-01-28T13:46:31Z Indexed on 2010/04/27 10:13 UTC
Read the original article Hit count: 557

Filed under:
|
|
|

Hi Friend,

I am developing a Firefox add-on, and for that I have used overlay, now I want that if somebody presses the key like control+j it should open my extension, and if somebody presses ctrl+space it should execute a JavaScript function.

I tried this:

<keyset id="mainKeyset">
    <key id="keyOpen" keycode="VK_J" oncommand="document.getElementById('menuboard').showPopup(document.getElementById('mypanel'), -1, -1, 'popup', 'topleft', 'bottomleft');"/>
    <key id="keyExecute" modifiers="control" keycode="VK_SPACE" oncommand="javascript:myfucntion();"/>
</keyset>

But where it's not working what I am missing can anybody help me, please.

Thanks,

Jaswant

© Stack Overflow or respective owner

Related posts about xul

Related posts about shortcut