Re: Checking SHIFT/CTRL/ALT hold in C++ xpcom
Neil <[email protected]> Fri, 18 Oct 2013 10:44:20 +0100
| Newsgroups | gmane.comp.mozilla.devel.xpfe |
|---|---|
| Message-ID | <[email protected]> |
YuLo wrote: >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();"/> > > I think that in this case the event will contain the modifiers if the button is clicked with the mouse (which is the usual case for toolbarbuttons but not necessarily for other XUL elements). So you could write oncommand="if (event.ctrlKey) test();" -- Warning: May contain traces of nuts.