Checking SHIFT/CTRL/ALT hold in C++ xpcom

YuLo <[email protected]> Thu, 17 Oct 2013 04:07:45 -0700 (PDT)
Newsgroups gmane.comp.mozilla.devel.xpfe
Message-ID <[email protected]>
I'd like to check whether modify button SHIFT/CTRL/ALT is hold in xpcom c++.

in XUL tag
<toolbarbutton image="add.png" modifiers="control" oncommand="test();"/>

modifiers="control" - not work. as it is working in tag

<key keycode="VK_F1" modifiers="control" oncommand="test()"/>

I could use addEventListner and monitor PRESS/RELEASE of SHIFT/CTRL/ALT buttons,
But may be there is simpler way to check whether these buttons are hold.