I'd like to know if there is a way to raise an event in mozilla. I'm developing an application using XUL and what I want to do is have a button that raises an event from it's onClick handler. The event would be a key press. So actually what I would like to do is have the button akt as a keypress....

something like:

<button id="mybtn" value="A" onclick="raiseEvent(keyPress,65,document.getElementById('mynode'))"/>

where the raiseEvent whould raise a keyPress event of the A key( ASCII 65) to the node identifyed by mynode.